hope you can help me.
I have a fresh install of WordPress 3.6 and I am using ACF. I noticed some problems in page edit screen (Links dialog not listing pages, missing buttons in HTML view,…) When I looked at firebug console it gives me the following Error
Uncaught TypeError: Cannot read property 'length' of undefined in file load-scripts.php
I deactivated all plugins and reactivated one by one and found out that the error appears only when ACF is activated and only on the edit screen.
Any ideas on how to fix this?
Thanks for the bug report, however, I’m not sure why you are experiencing a core JS error when ACF is activated.
Have you tried swapping to a default WP theme to make sure the issue does not come from a conflict there?
Also, can you confirm that all other plugins are disabled when you see this error or are there still a few activated?
I only ask because this is the first occurrence of this issue, so I believe it will be specific to your install.
thanks for answering,
I have tried everything you suggested.
– Re-uploaded a fresh install of wordpress
– deactivated ALL plugins except acf
– switched to default theme
But still… Error remains ONLY on post.php when I am in edit mode for a page.
The custom fields work fine but some other things are broken.
Is there anything else I can do to get to the bottom of this? Otherwise I might just have to live with it…
I also migrated to WP3.6 a week ago. Today I had to adjust a slug of a post and I had the the same error. Also I deactivated all plugins and changed theme to Twenty Thirteen. Only when I active ACF and I go to post-types where I have ACF fields the error happens (my test is the slug-edit button and the screen-option tab).
I still testing further, but because I mention to Zartgesotten that only she has the problem I thought I inform you that she is not the only one.
Hi Elliot, Anja,
I wanted to test if maybe a specific ACF field type was causing the error. So I put a field group back in draft status. It had only 1 text field. And right away the problem was solved. So I did put the field group in published status to check if the error was back again. But the error did not happen! until now I was still in the Twenty Thirteen theme with ACF as only plugin. I turned on all my plugins, still working! turned on my custom theme, still working!
(to be complete, I also had to put some widgets back because the were lost after theme en plugin changes)
So for me, putting a field group in draft status and publish it over again helped to solve the problem.
I hope this helps you.
I’m having the same problem once i updated to 4.2.2. DessiTap’s solution works for one group, but can’t fix multiple groups. I have 5 groups used on 5 different pages. It seems that only the group that is fixed last works, but the previously fixed groups don’t work anymore.
I’ve also deactivated all other plugins and switched to default theme, so it is definitely caused by the ACF plugin.
My client can use Link and Add media functions only at a page that has Draft mode fixed group.
The topic ‘Uncaught TypeError: Cannot read property 'length' of undefined’ is closed to new replies.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
© 2023 Advanced Custom Fields.