[Resolved] [Plugin: Cookie Law Info] Meta Data from Advanced Settings
Firstly I think the plugin is brilliant – very easy to use and does exactly what it needs too.
However we’re having some problems, when adding products to the website http://www.vintageatnumber18.co.uk it is adding 2 meta’s firstly cookie_duration & cookie_type – both of which are then appearing under the description section of our products – one example you can see here… http://www.vintageatnumber18.co.uk/shop/t-shirts/minnie-mouse-disney-t-shirt/
I can see that these appear under advanced settings on the product page, however even if I delete them and then publish, it puts them back again.
Hope you can let us know why.
Hi, nice to see it in use near my old stomping grounds 🙂 And a really nice customisation too, really fits with your website.
I’ll take a look at that, very strange because the custom meta boxes that it uses are registered to the cookie law info custom post types only. It may be an issue with another of your plugins rather than mine. I’ll see what I can find out and get back to you ASAP.
Just for my reference, I see you’re using wp-commerce but are you using other plugins on the product details page? That’ll help me iron it out quicker.
The only other plugins I can think of, that are on that page will be the SEO by Yoast.
Thanks for the quick response too – hopefully get it sorted soon.
Ok thanks, unlikely to be Yoast. I’m taking a look now.
Ok, not 100% but I think I may know what’s happening.
You have this issue on some but not all of your product pages, leading me to believe it’s a setting within a product page. I also see you have this in the HTML of the problem page:
<div class="custom_meta"> <strong>cookie_duration: </strong><br /> <strong>cookie_type: </strong><br /> </div><!--close custom_meta-->
I downloaded wp-e-commerce and see that on the “Add Product” page there’s an “Advanced Option” to add/remove custom meta per page – are you perhaps using the custom fields? I may be wrong, it’s hard to say without setting up a complete set of products, etc, but I suspect that is the issue in which case it’s not a bug.
Hope that helps!
Love your website by the way, that is honestly one of the best looking WP ecommerce sites I’ve seen.
Yeah you’re right – that is the option in WP E-commerce, but even when I delete those custom meta’s and then publish the page they re-appear again.
If it’s any easier I can create an admin login for you to look yourself? if you wouldn’t mind of coure?
Thanks – only my second time using wp ecommerce – my other site is http://www.totally4.com
Hi Andy, sure that would help. You can contact me via http://www.cookielawinfo.com/contact/ – I have about 20 mins now which might be enough to crack it else later this weekend I’m afraid. Will see what I can do!
Is there a chance it’s caching product data? I’ve not used wp-e-commerce so it would take me a while to get up to speed on that plugin to investigate in detail.
It’s also worth you putting a support request on the WP-e-commerce forum as I’ve been through the WordPress codex for the custom post functions and I don’t see that my plugin does anything it shouldn’t. I might be wrong though.
I’ve emailed you the logins.
I did have a caching plugin but it was causing too many problems so it was deactivated and deleted.
I’ll have a look into it.
Right, after several hours of digging I’m still not really sure how WP eCommerce is grabbing these fields, as the plugin registers them to a specific custom post type. These fields aren;t meant to be consumed by general post types- maybe I’m doing something wrong, maybe it’s WP eCommerce. I’ll keep looking to find out which.
The short term fix is to remove this code from line 63 of wpsc-single_product.php:
<?php if (wpsc_have_custom_meta()) : ?> <div class="custom_meta"> <?php while ( wpsc_have_custom_meta() ) : wpsc_the_custom_meta(); ?> <?php if (stripos(wpsc_custom_meta_name(),'g:') !== FALSE) continue; ?> <strong><?php echo wpsc_custom_meta_name(); ?>: </strong><?php echo wpsc_custom_meta_value(); ?>!<br /> <?php endwhile; ?> </div><!--close custom_meta--> <?php endif; ?>
– Note that this is a hack, not a fix. If you updated WP ecommerce this change would be updated. It also means if you do rely on this feature you’ve just switched it off.
Hope that’s useful in the mean time anyway. The whole fix might take a few more days as I’m waiting on some answers.
It is a mystery but I’ve removed that code and it’s dissappeared.
I’m off to Dublin now until Thursday so back on Friday, keep me updated.
AND thanks again!
Update: fixed in the next release. I have an additional update to make in that same release which I’m working on now, but you’ll be able to add those lines of code back in from version 1.0.2 onwards. I’ll make the update in the next day or two.
This is fixed in the latest version 1.0.2. There’s a ‘migrate’ function that will automatically run in the background to convert the old custom meta fields to the new ones, so you don’t need to do anything.
However in your case for each product where the fields do show, you’ll need to manually delete the custom fields in the Product Edit page of WP eCommerce. I’ve tested this quite a bit and it works every time for me.
One thing to note- if you’re running WordPress in ‘debug mode’ (e.g. via the setting in config.php on localhost) then when you add or edit products and click ‘update’ you get a page of warnings. The data saves fine, they are just warnings. I decided not to try and fix this, it’s an edge case that at best will affect 0.001% of users!
I have the same problem with all latest version of wp ecommerce and wordpress.
On each product page I see that on the left:
I disabled advanced options of wordpress at teh top – deleted all fields but no luck.
I have a bad deadline on that site so if you could help that would be great. Please how can I get rid of that because I cannot publish with that on the page.
Thank you so very much for your help 🙂
Hi, this is an error with another plugin, as the cookielawinfo plugin doesn’t have any of the fields you mention. The bug itself is really hard to find info on (trust me, I found out the hard way!) It’s actually caused by registering custom posts the wrong way. The “wrong way” is actually used in many tutorials on how to create custom posts (rather frustrating…) The correct way to create custom posts is not surprisingly found in the codex, but it’s easy to make the mistake as there are 2 functions that perform the same action. Hope that helps your plugin developer.
- The topic ‘[Resolved] [Plugin: Cookie Law Info] Meta Data from Advanced Settings’ is closed to new replies.