htmlburger / carbon-fields

WordPress Custom Fields Library ✨
https://carbonfields.net/
Other
1.39k stars 246 forks source link

Conflict with Yoast SEO (the cause seems to come from CF) #661

Closed zessx closed 5 years ago

zessx commented 5 years ago

Version

Issue description

Activating Yoast SEO generates the following error when editing a post:

// File: wp-i18n-950.min.js?ver=4.9.9:5 
Jed localization error: 
Error: Domain `carbon-fields-ui` was not found.
// Stacktrace:
// o @ wp-i18n-950.min.js?ver=4.9.9:5
// (anonymous) @ wp-i18n-950.min.js?ver=4.9.9:1
// o @ wp-i18n-950.min.js?ver=4.9.9:5
// e.__ @ wp-i18n-950.min.js?ver=4.9.9:1
// (anonymous) @ core.min.js?ver=3.0.2:10
// n @ core.min.js?ver=3.0.2:1
// (anonymous) @ core.min.js?ver=3.0.2:1
// (anonymous) @ core.min.js?ver=3.0.2:1

// File: core.min.js?ver=3.0.2:10 
Uncaught TypeError: Cannot read property 'addFilter' of undefined
    at Module.<anonymous> (core.min.js?ver=3.0.2:10)
    at n (core.min.js?ver=3.0.2:1)
    at core.min.js?ver=3.0.2:1
    at core.min.js?ver=3.0.2:1
// Stacktrace:
// (anonymous) @ core.min.js?ver=3.0.2:10
// n @ core.min.js?ver=3.0.2:1
// (anonymous) @ core.min.js?ver=3.0.2:1
// (anonymous) @ core.min.js?ver=3.0.2:1

// File: metaboxes.min.js?ver=3.0.2:1 
Uncaught TypeError: Cannot read property 'withConditionalLogic' of undefined
    at Module.<anonymous> (metaboxes.min.js?ver=3.0.2:1)
    at n (metaboxes.min.js?ver=3.0.2:1)
    at metaboxes.min.js?ver=3.0.2:1
    at metaboxes.min.js?ver=3.0.2:1
// Stacktrace:
// (anonymous) @ metaboxes.min.js?ver=3.0.2:1
// n @ metaboxes.min.js?ver=3.0.2:1
// (anonymous) @ metaboxes.min.js?ver=3.0.2:1
// (anonymous) @ metaboxes.min.js?ver=3.0.2:1

// File: blocks.min.js?ver=3.0.2:11 
Uncaught TypeError: Cannot read property 'withConditionalLogic' of undefined
    at Module.<anonymous> (blocks.min.js?ver=3.0.2:11)
    at n (blocks.min.js?ver=3.0.2:1)
    at blocks.min.js?ver=3.0.2:1
    at blocks.min.js?ver=3.0.2:1
// Stacktrace: 
// (anonymous) @ blocks.min.js?ver=3.0.2:11
// n @ blocks.min.js?ver=3.0.2:1
// (anonymous) @ blocks.min.js?ver=3.0.2:1
// (anonymous) @ blocks.min.js?ver=3.0.2:1

// File: post.php?post=1&action=edit:2299 
Uncaught TypeError: Cannot read property 'initialize' of undefined
    at post.php?post=1&action=edit:2299
// Stacktrace:
// (anonymous) | @ | post.php?post=1&action=edit:2299

Container definition

Container::make('post_meta', 'foo', 'Foo')
  ->add_fields( array(
    Field::make( 'text', 'crb_bar, 'Bar' ),
  ) );

Steps to Reproduce the Problem

  1. Edit the "Hello World" post
    • There should have no error in the console panel
    • You should be able to see the "Bar" field, and open/close the "Foo" fieldset
  2. Install and enable Yoast SEO (no configuration required)
  3. Edit the same "Hello World" post and check the console panel
    • Errors are showing in the console (see previous paragraph)
    • You're no longer able to open the "Foo" fieldset (and therefore you cannot fill the "Bar" field)
zessx commented 5 years ago

Side note: this issue does not appears on Wordpress 5.0.3.

dean-me commented 5 years ago

+1 here

jorostoyanov commented 5 years ago

The issue is not present in WordPress v5.0.3 and v5.1 with the latest versions of Carbon Fields (v3.0.2) and Yoast SEO (v9.6).

@zessx, @dean-me, please update to the latest versions of WP core and the used plugins 🙂

smspivak commented 4 years ago

I have the same problem. WP 5.3.2 CF 3.1.8 Yoast SEO 12.8

vendor.min.js?ver=3.1.8:49 Uncaught TypeError: this.activateMode is not a function
    at media-views.min.js?ver=5.3.2:1
    at Lt (vendor.min.js?ver=3.1.8:18)
    at Function.Pu (vendor.min.js?ver=3.1.8:18)
    at i._createModes (media-views.min.js?ver=5.3.2:1)
    at initialize (media-views.min.js?ver=5.3.2:1)
    at initialize (media-views.min.js?ver=5.3.2:1)
    at initialize (media-views.min.js?ver=5.3.2:1)
    at i.h.View (load-scripts.php?c=1&load[chunk_0]=hoverIntent,common,hoverintent-js,admin-bar,svg-painter,underscore,shortcode,backbone,wp-util,wp-backbone,media-models,wp-pluplo&load[chunk_1]=ad,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable&ver=5.3.2:250)
    at i.constructor (load-scripts.php?c=1&load[chunk_0]=hoverIntent,common,hoverintent-js,admin-bar,svg-painter,underscore,shortcode,backbone,wp-util,wp-backbone,media-models,wp-pluplo&load[chunk_1]=ad,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable&ver=5.3.2:252)
    at i.constructor (media-views.min.js?ver=5.3.2:1)
sdelfi commented 4 years ago

The problem is still topical