johnbenedict
Forum Replies Created
-
Forum: Plugins
In reply to: [AMP] Custom Permalink SetupAnyone? Any ideas?
Forum: Plugins
In reply to: [AMP] amphtml missing a slash after site urlHi @westonruter — finally able to look into this for you. No we are not doing any rewriting of
$_SERVER['REQUEST_URI']
Forum: Plugins
In reply to: [AMP] amphtml missing a slash after site urlI have no idea. I cannot find anywhere in our codebase where this is changed.
We are however using
home_url()
quite a bit — and we are always adding that trailing slash — so something like this:home_url( "/something/")
I did just test the output of
home_url( '/' )
— and the trailing slash IS there. So it should be working in your function…Forum: Plugins
In reply to: [AMP] amphtml missing a slash after site urlHey @westonruter — after going over this with our developer — we’re not doing anything to
home_url
. No filter, manipulation, etc.In order to fix the issue we were having — we made a simple update to
amp_get_current_url()
:This:
$url = preg_replace( ‘#(^https?://[^/]+)/.*#‘, ‘$1’, home_url( ‘/’ ) );
To this:
$url = rtrim(preg_replace( ‘#(^https?://[^/]+)/.*#‘, ‘$1’, home_url( ‘/’ ) ), ‘/’) . ‘/’;
But to keep from breaking the plugin — we actually went this route in
footer.php
:$html = ob_get_clean(); $html = preg_replace("!(domain\.com)([a-z0-9])!i", '\1/\2', $html); echo $html;
I hope this helps. Thank you for being so responsive and willing to help.
- This reply was modified 4 years, 9 months ago by johnbenedict.
Forum: Plugins
In reply to: [AMP] amphtml missing a slash after site urlAfter talking to our dev — we’re doing a good amount of customization > output buffering + link re-writing for our CDN. I probably should have discussed this with him first. So not sure it’d be all that helpful.
Forum: Plugins
In reply to: [AMP] amphtml missing a slash after site urlIn
amp_get_current_url()
we’ve found a simple change that fixed our issue:Change this:
$url = preg_replace( ‘#(^https?://[^/]+)/.*#‘, ‘$1’, home_url( ‘/’ ) );
To this:
$url = rtrim(preg_replace( ‘#(^https?://[^/]+)/.*#‘, ‘$1’, home_url( ‘/’ ) ), ‘/’) . ‘/’;
Forum: Plugins
In reply to: [AMP] amphtml missing a slash after site urlOk — that is very likely what is happening. I do see some uses of
home_url
doing something like this:home_url('/something')
I will look into fixing this within our own setup.
Thank you so much for you help troubleshooting this.
Forum: Plugins
In reply to: [AMP] amphtml missing a slash after site urlNot sure I want to post all the Site Health info here…
WordPress is 5.3.1 (right now)
AMP Plugin is 1.5.3 and is in Transitional ModeHome URL: https://www.campsitephotos.com
Site URL: https://www.campsitephotos.com/wp- This reply was modified 4 years, 10 months ago by johnbenedict.
Forum: Plugins
In reply to: [AMP] amphtml missing a slash after site urlYes. Like this in functions.php:
remove_action( 'wp_head', 'wp_generator' ); // remove wordpress version
- This reply was modified 4 years, 10 months ago by johnbenedict.
Forum: Plugins
In reply to: [AMP] amphtml missing a slash after site urlhttps://www.campsitephotos.com/
Not using multisite.
Install is standard.
AMP is active on Blog and Campground Pages right now:
https://www.campsitephotos.com/blog/camping-news/covid-19-campground-reopening-update/
https://www.campsitephotos.com/campground/ca/doheny-state-beach/
- This reply was modified 4 years, 10 months ago by johnbenedict.
- This reply was modified 4 years, 10 months ago by johnbenedict.
Forum: Plugins
In reply to: [AMP] Remove schema markupThank you @westonruter! I really appreciate the fast response.
I’ll take the less ergonomic solution for now. Looking forward to the update.
Forum: Fixing WordPress
In reply to: Cannot Edit Galleries Once They Have Been Added{BUMP}
No one with any other ideas?
Forum: Fixing WordPress
In reply to: Cannot Edit Galleries Once They Have Been AddedOk – setups that work are:
mySQL: 5.2.6
Server API: Apache 2.0 HandlerSetup that does not work:
mySQL: 5.2.17
Server API: CGI/FastCGINot sure what other info would be needed to troubleshoot this?
Forum: Fixing WordPress
In reply to: Cannot Edit Galleries Once They Have Been AddedGlad I’m not alone.
I actually have multiple sites that utilize WP Galleries – all on the latest version of WP.
All work just fine – except for this one – which is on a different host.
I’m wondering if it has something to do with mySQL or a PHP Config specific to this host???
Trying the .htaccess security fixes I found around Google didn’t help…
Forum: Fixing WordPress
In reply to: Cannot Edit Galleries Once They Have Been AddedAlso – I CAN edit Single Photos once they have been added. Something is up with Galleries.