soflyy / oxygen-bugs-and-features

Bug Reports & Feature Requests for Oxygen
https://oxygenbuilder.com/
315 stars 29 forks source link

ELEMENT_ID of repeater returns DATA-ID #3544

Open RCRGodinho opened 3 months ago

RCRGodinho commented 3 months ago

Describe the bug When using a repeater with custom JS code inside an element, using the "%%ELEMENTID%%" tag returns the 'data-id'_ of the element. The repeater normally increments a '-x' numeration to the elementid when using a repeater, shouldn't the "%%ELEMENTID%%" tag return the elementid generated in the repeater instead of the 'data-id'_ ?

A link to a Sandbox site where the bug has been reproduced: https://oxygen-qt3fp7h9jnjzl.oxygen-demo.qsandbox.org/sample-page/

Steps to reproduce the behavior:

  1. Add a repeater element;
  2. Add custom JS to an element inside the repeater;
  3. Use the "%%ELEMENT_ID%%" tag;
  4. Run the page in the front-end and inspect;
  5. Check console (if logged) or check Sources where you will see the data-id tag being passed instead of the actual ID '-1' or '-2';