Support » Plugin: Hustle Marketing, Social Share, Email Opt-in Form, and Popup Plugin » Fatal error: Cannot redeclare _wp_translate_postdata()

  • Resolved advantagen

    (@advantagen)


    This plugin causes the following error on my site, breaking it’s functionality:

    Fatal error: Cannot redeclare _wp_translate_postdata()

    For now, simply disabling your plugin resolves the problem (which is why I know its the culprit), but I assume there is a resolution to this.

    Please advise, if not for my sake then for the sake of anyone else running into this issue that might be scratching their heads trying to figure out what’s wrong.

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Support Predrag Dubajic WPMU DEV Support

    (@wpmudev-support1)

    Hi @advantagen,

    When the “Cannot redeclare” error is shown it usually means that the two plugins are using the same function name and they conflict with each other because of that, however I searched through Hustle files and can’t find any mention of wp_translate_postdata in there, and I can’t replicate the issue on my installation.

    Can you tell us if the issue happens when only Hustle is active on your site, with default theme and no other plugins, so we can check if it’s a conflict with something specific on your site?

    Also, did you see anything else in that error, did it mention the file and line where the function is declared?

    Cheers,
    Predrag

    Hey Predrag,

    Here’s the full error:

    Fatal error: Cannot redeclare _wp_translate_postdata() (previously declared in /home/public/wp-admin/includes/post.php:20) in /home/public/wp-admin/includes/post.php on line 175

    So based on that, it wouldn’t appear as though this is related to a plugin conflict.

    Plugin Support Predrag Dubajic WPMU DEV Support

    (@wpmudev-support1)

    Hi @advantagen,

    Thanks for the additional info, but I’m afraid that this doesn’t help much ๐Ÿ™
    The error says that the function is declared both times in core WP file, and I’m not sure why Hustle would be causing it as it doesn’t have that function registered in its code.

    Can you tell me which WordPress and PHP version you are using on your site, and have you made any changes to WP core files?

    Also, could you paste the code from your /wp-admin/includes/post.php file in https://pastebin.com/ and share it here so we can check it out?

    Cheers,
    Predrag

    This happens with both WP 4.9.8 and 4.9.7; I’m using PHP v5.6.38; and I don’t recall ever editing any core files, though here’s the pastebin you inquired about to confirm:

    https://pastebin.com/tcuRURbG

    To clarify, thinking the issue might’ve had something to do with my fairly recent upgrade to WP 4.9.8, I downgraded to 4.9.7 and the issue persisted. This would’ve included the contents of the /includes/ folder, so I doubt the issue is with the post.php file itself. I have no idea where the issue actually is though.

    For me, sidestepping the issue is as simple as not using this plugin, but I thought you’d like to know about the issue, as would other people who may be coming across the same issue and not understanding where it’s coming from.

    Plugin Support Dimitris – WPMU DEV Support

    (@wpmudev-support6)

    Hello there

    It seems that the file you attached is a lot different from the one in v.4.9.8.
    https://github.com/WordPress/WordPress/blob/4.9.8/wp-admin/includes/post.php

    Could you please manually update all WP core files?
    You can download latest WP .zip file, uncompress it and upload all folder and files apart from the /wp-content/ folder, which includes all of your plugins, themes, images etc.

    Let us know how that went! ๐Ÿ™‚

    Warm regards,
    Dimitris

    Oops, I’m sorry – I uploaded the contents of /wp-includes/post.php, not /wp-admin/includes/post.php

    Here you go: https://pastebin.com/6hKJdb09

    At least looking at the first few lines and the total number of lines, they appear to be identical.

    Plugin Support Dimitris – WPMU DEV Support

    (@wpmudev-support6)

    Hello there @advantagen,

    appreciate the feedback here! ๐Ÿ™‚

    Still, did you try to re-upload all core WP files and folders as I mentioned in my previous reply?
    If not, could you please give this a try to be sure that core is clear?
    Looking forward for your results!

    Take care,
    Dimitris

    To clarify, I’ve already gone from 4.9.8 to 4.9.7 and then back to 4.9.8, so the core files have already been re-uploaded a couple times (which has made no difference).

    Plugin Support Kasia – WPMU DEV Support

    (@wpmudev-support2)

    Hello @advantagen,

    After a bit of research, I found a very similar thread where there was a problem with Gravity forms and Vantage Theme. Can you tell us what theme are you using and see if switching to 2017 WordPress theme will allow you to use Hustle? Let us know.

    kind regards,
    Kasia

    Yep, I do use the Vantage theme, so I guess it must be a conflict. And even though I also have Gravity Forms, deactivating it makes no difference when Vantage and Hustle are activated, so it would seem the GF part is irrelevant in my case.

    Anyway, the whole site functionality is based on the theme so I can’t just use another one, but at least we know the source of the issue now.

    Plugin Support Nastia – WPMU DEV Support

    (@wpmudev-support9)

    Hello @advantagen

    Hope you’re doing well!

    I’ve tested a free version of Vantage theme and can’t replicate the issue. I guess you’re using this premium version.

    Would you please email us directly to contact@wpmudev.org so we could see how we could continue troubleshooting this issue? Add โ€œAttn: Nastiaโ€ as a subject and link back to this thread.

    Looking forward to your reply!

    Cheers,
    Nastia

    Actually, the free version you mentioned isn’t the same theme at all, and while I appreciate the effort you’ve put into troubleshooting this, it’s enough for me to know that it’s a conflict between your plugin and my theme. And since my theme is essential to my site’s functionality, it’s easier for me to simply choose another plugin. Perhaps this thread can help someone else that’s runs into the issue in the future though.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Fatal error: Cannot redeclare _wp_translate_postdata()’ is closed to new replies.