I am getting an error on some pages:
Uncaught TypeError: Cannot read property 'Library' of undefined - acf-input.min.js
It happens after I activate the Mediapress plugin. I found a two year old thread for two different plugins, same error, that said
The problem is that [ plugin 1 ] is loading the WP media-editor.js file before the theme does, this makes the “wp” object unavailable for [ plugin 2 ].
Is there something I can do?
Is this a Mediapress issue or ACF issue? Neither?
[ Latest WP, BP and BBP ]
Hi @andrewgtibbetts
I’m afraid I had a hard time to reproduce this issue. Could you please tell me the detailed steps to reproduce it? If you can share some screenshots, that would be great too!
Thanks!
This reply has been marked as private.
Thanks, James.
I just private posted a link and creds to login.
It seems to only occur in the Buddypress areas (Groups and Members).
So, I’m working with Brajesh of BuddyDev on this and he wants to know
…in which file they (ACF) are loading the media dependency js files.
I have found the reason.
To make ACF’s acf_form()
work, acf_form_head()
needs to be called.
I was calling it without any checks for environment at the top of my buddypress.php
master template file.
I have now reduced it’s call only to where I have acf forms and things seem to be working again.
Sorry for the run-around.
Facing the same problem.I think your advice will work in my case.