WPPizza – A Restaurant Plugin for WordPress › Support › General Support › Cannot add to cart when exclude size is selected
- AuthorPosts
- 16 February, 2015 at 9:03 pm #7918
a) can’t replicate this (as in being an error , stopping me from adding this to the cart)
b) i *can* see this in the debug log. easy enough to fix
(though a production server should never output these errors, only log them . if you output anything to ajax other than what needs to be there (warnings,errors, notices – you name it WILL fall over – hence the error_reporting(0) at the top of the ajax files as – more often than not – other plugins throw many many notices)… anyway, i digress…that’s a whole topic in itselfc) – pretty much just ignore b) . i’ll take care of those particular warning …
16 February, 2015 at 9:04 pm #7919ie , NEVER have
define(‘WP_DEBUG_DISPLAY’, true);
on a production server16 February, 2015 at 9:13 pm #7920I understand.
define(‘WP_DEBUG_DISPLAY’, true);
Is set to false on the live site.
16 February, 2015 at 10:37 pm #7922in any case.
this will not be an issue anymore with the update which should be done tomorrow
(just need to tweak a couple more css bits)17 February, 2015 at 2:38 am #7924uploaded an updated version to your test server.
should now all be fine (and include a label for textbox entries)
will do some checking tomorrow..
PS:
you test server omits version numbers in linked files (css/js) , so you might have to clear your cache/reload pages(it isn’t such a good idea to do that btw)
17 February, 2015 at 5:28 pm #7928Not quite sure what’s not a good idea clearing cache or omitting version numbers.
As for the fix everything appears to be working okay (comments box as well) will do more testing and let you know of any faults.
Thanks again.
17 February, 2015 at 5:30 pm #7929Not quite sure what’s not a good idea…
omitting version numbers
>and let you know of any faults.
please do17 February, 2015 at 6:05 pm #7930I haven’t changed anything to omit them on purpose. Not quite show how to enable them.
17 February, 2015 at 6:09 pm #7931dunno, maybe your theme or some plugin does this…
17 February, 2015 at 7:24 pm #7932Ah okay.
We are still getting the occasional error message when using the menu on ios.
Only comes up as
error
No idea how to find out any more details about it as I can’t inspect the Safari browser.
It doesn’t stop anything from working its just an annoyance.
Found this website with details how to debug but I don’t understand this. Don’t know if it’s of any use to yourself.
http://petewarden.com/2013/01/23/how-to-debug-javascript-errors-on-ios/
17 February, 2015 at 7:36 pm #7933as long as you are omitting version numbers , i am not even going to try, sorry…
17 February, 2015 at 7:43 pm #7934to spell it out
——no version numbers——a) day 1: customer comes to site , does his thing
b) day 2: plugin gets updated, javascript changes and server expects those js variables to be passed on
c) day 3: customer comes back to site, customers browser says: wait, i do not need to downlaod that javascript again, i already got it cached, let m use that oned)result=> some, more or fewer of required variables get sent to server as old js is being used
e) server response: what do you want from me ?
—– with version numbers——
a) and b) are the same
c) customer comes back to site, browser says: “hang on, that javascript file has changed , better download/use the new version”d)… we all live happily ever after…
(same goes for css by the way ,except that it won’t be fatal, just screws up your layout)
17 February, 2015 at 7:48 pm #7935Thanks for the explanation I understand, I’ll look into that.
17 February, 2015 at 8:47 pm #7936Is this the code that is stopping the versions from showing?
<?php function remove_version() { return ''; } add_filter('the_generator', 'remove_version'); remove_action('wp_head', 'wp_generator'); // remove wp version param from any enqueued scripts function remove_wp_ver_css_js( $src ) { if ( strpos( $src, 'ver=' ) ) $src = remove_query_arg( 'ver', $src ); return $src; } add_filter( 'style_loader_src', 'remove_wp_ver_css_js', 9999 ); add_filter( 'script_loader_src', 'remove_wp_ver_css_js', 9999 ); add_filter('widget_text', 'do_shortcode'); add_filter('the_content', 'foodkingsthelens_filter_ptags_on_images'); add_filter('excerpt_more', 'foodkingsthelens_excerpt_more');
This was in our theme-functions.php
17 February, 2015 at 9:53 pm #7950that bit does:
remove_wp_ver_css_js
17 February, 2015 at 9:57 pm #7951So hopefully removing that string will get rid of errors?
17 February, 2015 at 10:10 pm #7952It’s been removed.
Not sure how to test it has worked though 😉
Test site has been updated to reflect the change
17 February, 2015 at 10:43 pm #7953>Not sure how to test it has worked though 😉
just look at the page source
if it sayslink rel=’stylesheet’ id=’cff-css’ href=’http://blablablablbalab/cff-style.css?ver=4.1
etc it’s fine otherwise it just says
link rel=’stylesheet’ id=’cff-css’ href=’http://blablablablbalab/cff-style.css
(same goes for js files)
17 February, 2015 at 11:33 pm #7955Cheers for that.
It is showing version numbers 🙂
18 February, 2015 at 12:05 am #7957ok
on a different note though, you seem to have overwritten the AI plugin on your test server again with old files ?! (or old db entries ? cant be sure)
- AuthorPosts
- The topic ‘Cannot add to cart when exclude size is selected’ is closed to new replies.