RSS Feed/News field-adder breaks if it contains tokeninput

Status
Not open for further replies.

ENXF NET

Administrator
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P.S Member
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Nov 13, 2018
Messages
24,625
Points
823

Reputation:

You end up with:
Uncaught TypeError: Cannot read properties of undefined (reading 'replace')
Click to expand...

It's because the hidden input fields that select2 use don't have names.

I didn't test it too much, but perhaps it would be more appropriate for the .find selectors inside XF.FieldAdder.create() to be .find('input[name*="{counter}"], select[name*="{counter}"], textarea[name*="{counter}"]') rather than .find('input, select, textarea')?

Or check if there is a name attribute before...

Read more

Continue reading...
 
Status
Not open for further replies.
Top