WordPress.org

Forums

Advanced Custom Fields
[resolved] Fatal error: Cannot redeclare class (8 posts)

  1. nailliK
    Member
    Posted 2 years ago #

    Fatal error: Cannot redeclare class acf_walker_taxonomy_field_checklist in /wp-content/plugins/advanced-custom-fields-taxonomy-field-add-on/taxonomy-field.php on line 513

    http://wordpress.org/extend/plugins/advanced-custom-fields/

  2. Ian Dunn
    Member
    Posted 2 years ago #

    Until the developer fixes this, you can modify the file and wrap the class in a class_exists() condition. e.g.,

    if( !class_exists( 'acf_walker_taxonomy_field_checklist' ) )
    {
        class act_walker_taxonomy_field_checklist()
        {
            // ....
        }
    }
  3. elliotcondon
    Member
    Plugin Author

    Posted 2 years ago #

    Hi guys,

    This looks like an error with the advanced-custom-fields-taxonomy-field-add-on plugin. I would advise leaving a support question on his / hers plugin page

    Thanks

  4. deeve007
    Member
    Posted 2 years ago #

    Seems the developer tried fixing it using the wrapper:

    if( !class_exists( 'ACF_Walker_Taxonomy_Field_Checklist' ) ) :
    ....
    endif;

    But this still causes an error sometimes. But when I changed to the following, error doesn't occur:

    if( !class_exists( 'acf_walker_taxonomy_field_checklist' ) ) {
    ...
    }
  5. nailliK
    Member
    Posted 2 years ago #

    I tried changing if/endif to traditional {}, but I still receive the error on an irregular basis. Come on, ACF! Fix your plugin already!

  6. nailliK
    Member
    Posted 2 years ago #

    @elliotcondon: This error has been reported via github and they're pointing us back to you.

  7. Vincent Wasteels
    Member
    Posted 2 years ago #

    I confirm @deeve007 fix works well.

  8. elliotcondon
    Member
    Plugin Author

    Posted 2 years ago #

    Hi @nailliK

    Can you post a link to the thread where they link this back to me?
    I don't see how this is an issue with ACF, the issue is with the taxonomy field add-on created by another developer.

    P.S. v4.0.0 has it's own taxonomy field built in!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Advanced Custom Fields
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.