forEach is not a function after upgrading the plugin to v4


I got this exception after upgrading my pluging to v4. Any clue?

Are you sure you are sending an array to this function?

1 Like

Yes, the code works perfectly without plugin v4 upgrade

I’m dealing with this error now. It’s a false-positive when you load your element and it’s not finding it right away. I am trying to set a flag to ignore it if there is no element to find, but it still triggers the error. It happened on one of my pages that I had to get approved for a plugin, and they rejected the wrong plugin cause it had that error lol.

However, the v4 is server side action update. It’s not related to element. Are you doing a server side action @BubbleCoach ? Did you migrate from v3 to 4 or from an earlier version?

Ah my bad, misread.

@BubbleCoach how are you running this like jici said?

this could be related to the way you’re bringing in the data. are you sure it’s formatted correctly or doesn’t have a typo somewhere?

Your problem is probably related to get method and length that have been updated. Please read this

1 Like