stevenbradley
Forum Replies Created
-
I have figured out the issue. Since the data for tables is stored in the wp_posts table of the wordpress database. When I made mass search and replace changes for certain content and replaced it with a shortcode, it replaced this content in the table with the shortcode which then made the JSON data corrupt.
I wish you all would be more clear about where the data for the tables is stored. Having it in the wp_posts table is the last place I would have expected it to be. By not being transparent about this, mistakes will be made by more advanced users.
- This reply was modified 2 months, 3 weeks ago by stevenbradley.
Forum: Plugins
In reply to: [AMP] Simple javascript using amp-script not workingAlright, thanks. I will look into how to hack the classic editor as that is the real issue at this point and is not really an AMP plugin problem as I originally thought.
Forum: Plugins
In reply to: [AMP] Simple javascript using amp-script not workingAlso this is the code that is being removed by classic editor:
<amp-script src=”https://example.com/my-script.js” width=”300″ height=”100″>
<p>A single line of text</p>
</amp-script>It’s leaving the paragraph element and removing the surrounding amp-script tag.
Forum: Plugins
In reply to: [AMP] Simple javascript using amp-script not workingActually, after investigating it looks like the classic editor is the issue. When I add the code in the text view it is fine, but when I switch the tab to visual it must remove it because when I switch back to text view the code is gone.
So classic editor is removing the code dynamically when the view is toggled between text and visual.
Is there a working solution for this?
Forum: Plugins
In reply to: [AMP] AMP Carousel html being removed by post editorNone of the suggestions seemed to work including adding the gallery shortcode which just showed the images inline on the screen.
Just puzzled why any AMP tags are off limits and not allowed to be added to pages by people. You should allow all tags in AMP. Bad enough AMP is limiting in it’s choices of dynamic elements to accomplish certain tasks. Limiting those limited elements leaves us with essentially nothing.
Forum: Plugins
In reply to: [AMP] AMP Carousel html being removed by post editorI added the shortcode which does add the AMP carousel code but the same issue is happening where the containing amp-carousel tag is removed leaving the inner HTML tags.
The filter to allow the AMP carousel tag is also in place in my functions file. Might have to just go with the gallery to create the carousel, and make the text images as a work around.Forum: Plugins
In reply to: [AMP] AMP Carousel html being removed by post editorSince I’m using the carousel to show text I went with the filter option in functions.php, but the carousel is still being dynamically removed from the post editor. We are using the classic editor, would that make any difference? Should I add the carousel via short code?
Forum: Plugins
In reply to: [AMP] Keep AMP enabled even with “rejected” errorsGreat, that seems to have fixed the form and it runs as expected now. That was the last place I would have looked for the bug/error.
No more errors reported anywhere. Thank you for all your help.
Forum: Plugins
In reply to: [AMP] Keep AMP enabled even with “rejected” errorsHere’s a text input field that is being marked as an error
<input type=”text” role=”textbox” class=”calc-input” id=”liens” name=”liens” [value]=”(result1 != null) ? result1.liens : ‘verifying…'” />
This is a screenshot of the corresponding error in the AMP plugin
Forum: Plugins
In reply to: [AMP] Keep AMP enabled even with “rejected” errorsHere’s one of many lines of code that it seems to have issues with:
<input type=”hidden” name=”liens” [value]=”result1.liens” />
I guess it’s not respecting the [value] as an attribute so it’s marking it as an error?
Forum: Plugins
In reply to: [AMP] Keep AMP enabled even with “rejected” errorsOk, maybe it’s not fixed, it’s showing errors but not from SEO premium now.
https://reverse.mortgage/testing-post-testing
This page uses a form built by me and it uses AMP bind to go through each step and add values to the form on the final step. It’s saying there are issues with the form fields using bind to set their values.
This is legitimate AMP code and doesn’t have errors so not sure why the AMP plugin is reporting them as such.
Forum: Plugins
In reply to: [AMP] Keep AMP enabled even with “rejected” errorsLooks like the issue has been resolved. I added support for title tag via the functions.php file of the theme and now no more false errors are being reported.
I guess not having title tag enabled caused SEO premium to not output everything correctly to the html head.
Thanks for your help, issue resolved ??
Forum: Plugins
In reply to: [AMP] Keep AMP enabled even with “rejected” errorsI’m nowhere near being an expert with plugins, but I don’t see where any conflicts could be coming from in the code for that function. It does work with the output so maybe that is where things are going wrong:
/* Used in the force rewrite functionality this retrieves the output, replaces the title with the proper SEO* title and then flushes the output.*/
public function flush_cache() {
global $wp_query;
if ( $this->ob_started !== true ) {
return false;
}$content = ob_get_clean();
$old_wp_query = $wp_query;
wp_reset_query();
// Only replace the debug marker when it is hooked.
if ( $this->show_debug_marker() ) {
$title = $this->title( ” );
$debug_mark = $this->get_debug_mark();/*
* Find all titles, strip them out and add the new one in within the debug marker,
* so it’s easily identified whether a site uses force rewrite.
*/
$content = preg_replace( ‘/<title.*?\/title>/i’, ”, $content );
$content = str_replace( $debug_mark, $debug_mark . “\n” . ‘<title>’ . esc_html( $title ) . ‘</title>’, $content );
}$GLOBALS[‘wp_query’] = $old_wp_query;
echo $content;
return true;
}Forum: Plugins
In reply to: [AMP] Keep AMP enabled even with “rejected” errorsI would say after further research/testing this is a Yoast SEO plugin issue conflicting with the AMP plugin and not a core issue with the AMP plugin itself.
All but 1 error comes from Yoast SEO Premium, so that plugin is reporting validation errors where there are none.
I wish there was a way to just choose to ignore those errors and have AMP still be enabled. Yoast doesn’t know what they are talking about (as usual).
Below is a link to an image of the errors
https://reverse.mortgage/imgs/screenshot-2019-07-18-09-46-14.png
Forum: Plugins
In reply to: [AMP] Keep AMP enabled even with “rejected” errorsWell the problem is that the code that is being reported as having AMP errors doesn’t really have any according to google’s own AMP validation tool.
So when I choose accept it removes what it thinks is bad code and then the form on the page doesn’t work right. The form uses AMP states (bind) to change certain values.
Below is output for one of the errors, it looks like another plugin may be marking this as an error and then the AMP plugin is following that?
<input … result1.liens=”” …>
code
invalid_attribute
element_attributes
type: text
role: textbox
class: calc-input
id: liens
name: liens
null
result1.liens
:
node_name
parent_name
input
type
html_attribute_error
sources[
{
“type”: “plugin”,
“name”: “wordpress-seo-premium”,
“function”: “WPSEO_Frontend::flush_cache”,
“hook”: “wp_footer”
}
]