No Time and date
-
Hi there – Looks like a good plugin, but the date and time don’t show on the page: http://gayetytheatre.com/buy-tickets/
Have checked and checked and I believe configuration for date & time is set up properly
Thoughts?
-
I’ve had a quick look at your site, and sure enough the Date and Time is missing. However if you Add a ticket, when the page reloads the Date & Time have magically appeared, which suggests that the date/time format is OK. StageShow uses jQuery calls to update the Shopping Trolley, and these by-pass much of the WordPress code, using cached copies of the date/time format which is how the date/time format can be different in the two cases.
Looking at the output with the missing date/time, the entry exists but the output is the HTML code for a space. This is consistent with what would be output if there was another price, for the same performance, above it, which in this case does not exist. I’ve tried to re-produce the same output, so far without success.
I would like to investigate this further so that I can determine the reason, and with that in mind I would be grateful if you could contact me via my contact page here, so we can move this forward offline.
Once a resolution is found, I will post the solution on this forum.
Hi Malcolm
Have sent you a mail from your contact form – Need a way to get you login details securely – Cheers – John
Hi John
Firstly, thank you for allowing me access to you site to investigate this problem.
Initially, I thought that Yoast SEO was the problem, because when it was deactivated the problem disappeared. With Yoast SEO activated, the problem could also be fixed by disabling the Facebook “Add Open Graph meta data” and Twitter “Add Twitter card meta data” options in the SEO Social settings. However after more digging I am now convinced that Yoast SEO is not the root of the problem.
Yoast SEO uses the “Page Extract” when either of the Facebook “Add Open Graph meta data” and Twitter “Add Twitter card meta data” options is enabled. If the extract is not defined in the page editor, then WP will load the page, strip out any shortcodes and use the first 55 words of what remains as the Page Extract.
WP-SpamShield adds a ‘the-content’ filter function which filters the page content once it has been loaded, and under certain circumstances this appears to ignore the page content passed to it, and reloads the page content from the WP database including any shortcodes. When WP determines the Page Extract it calls this filter and can get back the page content with the shortcodes included, when they had already been removed. This in turn means that the StageShow shortcode is run one or mores times, before it is run to generate the page output. The problem you are seeing is because it appears that the Box-Office row is not the first to be output.
For your site the solution is to either remove WP-SpamShield, or to manually add a Page Extract for any page that includes shortcodes.
Malcolm
Hi Malcom,
Your assessment of WP-SpamShield isn’t quite accurate.
The only code it modifies in
the_contentis to filter email addresses and encode/obfuscate them to prevent scraping by email harvesting bots. If there are none in the content, no filtering is done. That feature also can be disabled in the settings, so there’s no need to advise people to deactivate the entire plugin as you suggested.As for saying it’s changing the default Post/Page Extract so that it modifies shortcode behavior, I’m not sure where you’re getting that. That would be quite strange. I think it’s far more likely that something else is causing the issue.
I’ll audit the code of your plugin as soon as I can get to it, and run it against WP-SpamShield and Yoast to look for compatibility issues. We’ll be happy to discuss any compatibility issues with you and look into solutions.
I got your email and wrote you back. We can go from there. Have a good one.
– Scott
After another look at this, I have a third possible workaround solution.
The problem only occurs when the page content is empty after any shorcodes have been removed and the resulting page has been trimmed. So if you add some text to the page the problem disappears … I tried it with an empty HTML comment (<!- –>) after the shortcode and that worked a treat.
Fixed by update to WP-SpamShield v1.9.7 – Thank you Scott
Hey Malcolm!
You are very welcome! Thanks for your great communication via email and working together to create a solution. 🙂
– Scott
The topic ‘No Time and date’ is closed to new replies.