htmlburger / carbon-fields

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

Uncaught TypeError: Cannot read property error with carbon fields plugins #746

Open yubarajrai opened 5 years ago

yubarajrai commented 5 years ago

Version

Expected Behavior

Errorless plugin

Actual Behavior

Container definition

..,

Steps to Reproduce the Problem

  1. I have tested by removing and configuring all code randomly. The error is throwing without any field or some simple field code too. and It is happening on Dashboard only.

Comments

I have tested it by download direct github plugin also throwing similar error.

filipecsweb commented 5 years ago

Hi.

Have you tried setting the constant Carbon_Fields\URL?

I had an issue similar to yours in which my JS files were not being loaded.

Try adding to you wp-config.php:

define( 'Carbon_Fields\URL', 'https://www.yoursite.com/wp-content/plugins/your-plugin/vendor/htmlburger/carbon-fields' );

Notice that the constant value needs to contain the exact URL for your carbon-fields path. And you might want to use something dynamic, this is just an example.

I hope at least it can give you a direction.

quasiperfect commented 5 years ago

@yubarajrai do you have yoast installed ? i have the same problem as you on dashboard and yoast dashboard

yubarajrai commented 5 years ago

Hi.

Have you tried setting the constant Carbon_Fields\URL?

I had an issue similar to yours in which my JS files were not being loaded.

Try adding to you wp-config.php:

define( 'Carbon_Fields\URL', 'https://www.yoursite.com/wp-content/plugins/your-plugin/vendor/htmlburger/carbon-fields' );

Notice that the constant value needs to contain the exact URL for your carbon-fields path. And you might want to use something dynamic, this is just an example.

I hope at least it can give you a direction.

Hi @filipecsweb thanks for your response But, there is same issues still remaining after i defined the carbon-fields url.

yubarajrai commented 5 years ago

@yubarajrai do you have yoast installed ? i have the same problem as you on dashboard and yoast dashboard

Hi @quasiperfect Yes, Yoast is installed on my site which is having carbon fields mentioned error.

glebkema commented 4 years ago

I have the same problem. Have tried Carbon Fields 3.1.2 and 3.1.11 with Yoast SEO on WordPress 5.3.2.

While the Yoast SEO plugin is deactivated, everything is in order. But when Yoast SEO is active, the console on the dashboard page is full of errors:

image

core.min.js?ver=3.1.11:10 Uncaught TypeError: Cannot read property 'combineReducers' of undefined
    at Module.<anonymous> (core.min.js?ver=3.1.11:10)
    at n (core.min.js?ver=3.1.11:1)
    at core.min.js?ver=3.1.11:1
    at core.min.js?ver=3.1.11:1
metaboxes.min.js?ver=3.1.11:1 Uncaught TypeError: Cannot read property 'combineReducers' of undefined
    at Module.<anonymous> (metaboxes.min.js?ver=3.1.11:1)
    at n (metaboxes.min.js?ver=3.1.11:1)
    at metaboxes.min.js?ver=3.1.11:1
    at metaboxes.min.js?ver=3.1.11:1
blocks.min.js?ver=3.1.11:11 Uncaught TypeError: Cannot read property 'withConditionalLogic' of undefined
    at Module.<anonymous> (blocks.min.js?ver=3.1.11:11)
    at n (blocks.min.js?ver=3.1.11:1)
    at blocks.min.js?ver=3.1.11:1
    at blocks.min.js?ver=3.1.11:1
index.php:2223 Uncaught TypeError: Cannot read property 'initialize' of undefined
    at index.php:2223
codemonkeynorth commented 4 years ago

@yubarajrai - out of interest was it only happening on localhost?