WordPress 4.4.2 -> PHP Fatal Error: Cannot redeclare add_term_meta

This topic has 11 replies, 3 voices, and was last updated 8 years, 9 months ago ago by Eva Kemp

  • Avatar: susan bradley
    susan bradley
    Participant
    February 11, 2016 at 14:20

    Hi,

    my site has been down for a few days since the WordPress update. it appears they have implemented the taxonomy meta feature which now clashes with your theme. however there is also a slight difference: they use the ‘term’ parameter whilst you use the ‘taxonomy’ parameter

    /wp-includes/taxonomy.php

    function update_term_meta( $term_id, $meta_key, $meta_value, $prev_value = '' ) {
    ..
    update_metadata( 'term', $term_id, $meta_key, $meta_value, $prev_value );

    whereas you have

    /wp-content/themes/Legenda_v2.2/legenda/framework/inc/taxonomy-metadata.php

    function add_term_meta($term_id, $meta_key, $meta_value, $unique = false) {
    	return add_metadata('taxonomy', $term_id, $meta_key, $meta_value, $unique);
    }

    as such I didn’t want to just delete your functions (or try namespacing them to keep them separate) as i don’t know what that key difference will affect?

    I understand you can login and fix the file, but I’d be grateful also to know what the fix is? Also will we likely see an update to the theme to fix this soon?

    thanks

    10 Answers
    Avatar: susan bradley
    susan bradley
    Participant
    February 11, 2016 at 14:24

    sorry that was 2 different functions. obviously i meant the specific difference between eg

    wordpress
    add_metadata( 'term', $term_id, $meta_key, $meta_value, $unique );

    and
    Legenda
    add_metadata('taxonomy', $term_id, $meta_key, $meta_value, $unique);

    thanks

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    February 11, 2016 at 14:54

    Hello,

    You’re using very old theme version. Please update the theme to the latest version and Woocommerce as well.
    Before update delete “woocommerce” folder in the directory wp-content/themes/legenda/ and it’ll be reuploaded from a new theme package.
    Also update all required plugins https://www.8theme.com/download-plugins/ .

    Don’t forget to create back up of your files and database before starting update process!

    Best regards,
    Jack Richardson.

    Avatar: susan bradley
    susan bradley
    Participant
    February 11, 2016 at 15:01

    thanks for the swift reply, Jack. I’ll get on to doing that now

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    February 11, 2016 at 15:21

    Hello,

    You’re welcome.
    Let us know if further assistance is required.

    Best regards,
    Jack Richardson.

    Avatar: susan bradley
    susan bradley
    Participant
    February 11, 2016 at 16:48

    do i need to use the specific version of Woocommerce included inside your theme? (i think it’s slightly out of date) I tried updating it, but my styles aren’t right. I’m just trying to track down why.

    (it may be visual composer which i’ve not managed to update yet)

    Avatar: susan bradley
    susan bradley
    Participant
    February 11, 2016 at 17:01

    sorry i’d not uploaded “woocommerce” from within your theme. i thought that was a plugin so would update from the main plugin section. (slightly confused on your instructions). I’m uploading that folder from your theme now.

    Please, contact administrator
    for this information.
    Avatar: Eva
    Eva Kemp
    Support staff
    February 11, 2016 at 17:33

    Hello,

    Is your problem resolved?

    Regards,
    Eva Kemp.

    Avatar: susan bradley
    susan bradley
    Participant
    February 11, 2016 at 17:36

    error is fixed. layout is broken . please see private content added to post above

    thanks

    Avatar: susan bradley
    susan bradley
    Participant
    February 11, 2016 at 17:48

    sorry yes it is fixed now.

    the error has gone and the layout is displaying correctly

    the woocommerce folder had not uploaded correctly. all seems to be fine now. i’ll give it a thorough once over. http://www.susanbradley.co.uk/shop

    thanks for your assistance

    Avatar: Eva
    Eva Kemp
    Support staff
    February 11, 2016 at 17:59

    Hello,

    So as I see your Shop page is shown properly.
    Do you still need assistance from us?

    Regards,
    Eva Kemp.

  • Viewing 11 results - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.Log in/Sign up

8theme customization service
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.