Hi there,
I have enabled address field autocomplete inside an article node form that has an image field with the
media →
widget enabled.
When we upload a new image everything works great, but in case we need to edit the current uploaded photo we have to use the edit button.
The edit button is opening a cTool modal with the file entity form, but in reality is performing an Ajax request to fetch the data.
In firebug is we get the following error "TypeError: context.has is not a function".
I tracked down the error and it seems that when using modal windows context variable is a string (in my case context = #modalWindow) instead of an array. So in addressfield_autocomplete.js line 464 I changed:
if (context[0] !== undefined && context.has('[id^="addressfield-wrapper"]')) {
to
if (context[0] !== undefined && typeof context === 'array' && context.has('[id^="addressfield-wrapper"]')) {
I am not sure if that is a valid solution, reporting it here for more elaboration.
Thank you!
Closed: won't fix
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.