Jer Clarke
Forum Replies Created
-
I think it’s caused by any paragraph inside another paragraph.
I triggered this error with a custom transformation that transformed div.xyz into “ParagraphRule”, resulting in the div becomming a p, but there were already p inside that div, so now there were p in the p and it triggered the error.
If you don’t have any custom transformations going, try reviewing the post for any stray p tags that might be causing nested paragraphs in your output. Use the “toggle debug information” button in the Facebook Instant Articles to see the raw HTML output that FB IA is working with.
\o/
Forum: Plugins
In reply to: [AMP] rtl supportI posted a solution with custom CSS here: https://www.ads-software.com/support/topic/rtl-direction-support/#post-8236536
Forum: Plugins
In reply to: [AMP] RTL direction supportThe following extremely-simple CSS works based on pretty limited testing:
#DIRECTION-RTL, body, .direction-rtl { text-align:right; direction: rtl; } nav.amp-wp-title-bar a { background-position: right; }
Would be great if the devs could make this a default feature when WP is set to an RTL state.
Forum: Plugins
In reply to: [AMP] RTL direction support+1 surprised this isn’t a starting feature :S
Will endeavor to share the CSS I come up with here for anyone else who needs it.
Forum: Plugins
In reply to: [AMP] Structured Data ErrorsYou need to set a logo as described here:
https://github.com/Automattic/amp-wp
The image will be set if you have a featured image on the post. Any posts without featured images will fail the test every time.
Forum: Plugins
In reply to: [AMP] AMP validation errors in GoogleYou must have a featured image on each post that you want to be “valid” structured data-wise. Google needs the image in order to show the card at the top of search results, so basically they consider a post invalid if it’s missing.
See: https://developers.google.com/search/docs/data-types/articles
You’ll find that any post WITH a featured image is marked as valid automatically because the AMP WP plugin inserts the featured image info into the metadata for you (unlike the logo which you have to insert with code as demoed here: https://github.com/Automattic/amp-wp
THAT SAID: I wish this was more explicit in the documentation as it can be very confusing, and anyone expecting AMP to get their posts into search will be disappointed to learn that they aren’t because of missing featured images.
Forum: Plugins
In reply to: [AMP] A value for the logo field is required.The solution is in their GitHub docs: https://github.com/Automattic/amp-wp
Look for the “Schema.org (JSON) Metadata” section, it has a demo.
I can see why they didn’t want to make this automatic (the formatting guidelines are extremely precise: https://developers.google.com/search/docs/data-types/articles) but as-is it’s a huge impediment to the “turn on and it works” theme of the plugin. Anyone who doesn’t implement that code snippet to define their image is going to miss out on the carousel thing in google results that is the reason why AMP has become so mandatory :S
Forum: Plugins
In reply to: [WP Native Dashboard] PHP 7 deprecated constructorsFound another one in
loginselector.php
:class wp_native_dashboard_loginselector { // function wp_native_dashboard_loginselector($permit_template_tags) { function __construct($permit_template_tags) {
Forum: Plugins
In reply to: [WP Native Dashboard] PHP 7 deprecated constructors+1 this is a real problem with an easy fix!
PHP7 is going to explode in popularity now that the new Ubuntu LTS version supports it, so being compatible is important.
All you need to do to fix this is change the constructor method for classes to use
__construct()
instead of the class name, e.g.:wp-native-dashboard.php line 103:
class wp_native_dashboard { // function wp_native_dashboard() { function __construct() {
automattic.php line 15:
class wp_native_dashboard_automattic { // function wp_native_dashboard_automattic($tagged, $root_tagged) { function __construct($tagged, $root_tagged) {
langswitcher.php line 9:
class wp_native_dashboard_langswitcher { // function wp_native_dashboard_langswitcher($plugin_url, $as_head, $as_admin_bar) { function _construct($plugin_url, $as_head, $as_admin_bar) {
This has long been the best way to declare classes, but PHP7 now makes it a requirement to silence warnings in the logs.
Thanks to the author if you can patch this! If not hope others find my patches useful!
Developer: Please correct this if it isn’t true. Gonna go ahead and assume it’s accurate since OP is right and there have been no updates for 5 months.
Forum: Plugins
In reply to: [Instant Articles for WP] Images with captions not renderedThis MUST be added to the core plugin! Why would every user be expected to add this when it applies to every site that uses the default media uploader?
Forum: Plugins
In reply to: [Instant Articles for WP] PHP error in Custom transformer rules textarea+1 fix this ASAP it’s extremely simple. The code at fault is here:
echo $args[ 'double_encode' ] ? htmlspecialchars( $option_value ) : esc_html( $option_value ); ?></textarea>
Obviously there are cases where that array key doesn’t exist. Either ensure it exists by initializing the array at the top of the
universal_render_handler()
method with all the expected keys, or validate each key as you go.Also: Are you not developing this plugin with WP_DEBUG enabled? You should have seen this error yourselves:
https://codex.www.ads-software.com/Debugging_in_WordPress
FWIW this seems to apply to all textareas not just transformations. I see it in the analytics embed code textarea.
Forum: Plugins
In reply to: [Mailchimp List Subscribe Form] Just installed and say missing file@smackayht notably this probably isn’t the cause of your problem. It’s a harmless error and connecting to the API worked for me despite the error being in console.
Look in your PHP error logs for hints at what is actually causing your problem. There are a lot of bugs in the current version, hopefully a new one with this and other fixed will be released soon (I am using a hacked up version that includes the various bug fixes I’ve posted about on this forum)
Forum: Plugins
In reply to: [Mailchimp List Subscribe Form] Just installed and say missing fileThe file doesn’t exist. Here’s the error from console:
GET https://SITE/wp-content/plugins/mailchimp/js/admin.js?ver=4.5.3 404 (Not Found)
This isn’t surprising because the file doesn’t exist. Here’s where you enqueue it in mailchimp.php:
/** * Loads resources for the MailChimp admin page * * @return void */ function mc_admin_page_load_resources() { wp_enqueue_style('mailchimpSF_admin_css', MCSF_URL.'css/admin.css'); wp_enqueue_script('mailchimpSF_admin_js', MCSF_URL.'js/admin.js'); } add_action('load-settings_page_mailchimpSF_options', 'mc_admin_page_load_resources');
Please please please work harder to look for bugs in your plugin before pushing updates. This error is triggered every time the admin page is loaded without a browser cache.