WordPress.org

Ready to get started?Download WordPress

Forums

Custom Post Widget
[resolved] Fatal error: Cannot redeclare class custom_post_widget... (6 posts)

  1. John Sundberg
    Member
    Posted 4 months ago #

    I just updated the plugin to 2.5.1 and ran into this fatal error again:

    Fatal error: Cannot redeclare class custom_post_widget...

    I fixed the error by making the edit to custom-post-widget.php that I mentioned in this support thread: http://wordpress.org/support/topic/fatal-error-cannot-redeclare-my_content_block_post_type_init?replies=11

    Any chance we can get this edit added to the plugin so I/we won't need to do this manually each time the plugin updates?

    https://wordpress.org/plugins/custom-post-widget/

  2. Johan van der Wijk
    Member
    Plugin Author

    Posted 4 months ago #

    Hi John, I am very surprised that you are still experiencing this issue and I definitely think it is related to your hosting setup since no other user has ever reported this before.

    That being said, it was a simple change to make so I created version 2.5.2 where required_once is used instead of required.

    Until it is released as the new stable version you can download the new version here: http://downloads.wordpress.org/plugin/custom-post-widget.2.5.2.zip

    Please let me know if this version solves your issue.

  3. annlickander
    Member
    Posted 4 months ago #

    Just wanted to say that I had the same problem when I updated to 2.5.1. The new version, 2.5.2 (link in above comment), solved the problem for me.

  4. John Sundberg
    Member
    Posted 4 months ago #

    Glad to know I'm not the only one seeing that issue!

    Johan, thanks for making that edit. Really appreciate it for the present and the future.

    Out of curiosity, why do you think it's a hosting issue? I run a dedicated server from Rochen, which is about the best WordPress setup you can find, in my opinion.

  5. Johan van der Wijk
    Member
    Plugin Author

    Posted 4 months ago #

    Hi John, I think it might be a hosting setup as the plugin has been downloaded almost 100.000 times and I had never heard about this issue before. Of course, it could also be a plugin conflict but since the file seems to be included twice it *might* be possible that some server configuration duplicates the path to the file and then tries to load it twice (but really, this is just my suspicion).

    I am now waiting for feedback on another support topic: http://wordpress.org/support/topic/make-post-type-public and as soon as that topic is resolved I will release the new plugin version to the public which includes the fix for your problem.

  6. John Sundberg
    Member
    Posted 4 months ago #

    I think we can rule out hosting - I just updated the plugin to 2.5.1 on another site and it worked fine without throwing an error. Probably a plugin conflict on the first site, but I'm not sure which one at this point.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.