Field selector gets replaced by field value

My template has broken. At one point I had several field selectors e.g, @CustomerName@ which were correctly replaced by the value of the CustomerName field at runtime. Then, while continuing development of the template, all the selectors were replaced in the source by the text values of the data from the first record. So now, where my template used to have @CustomerNo@, it now has 225652. This has happened for every field. Obviously, this is of no use as the literal values only work for the first record, and don’t select the variable data.
I have no idea what I did to achieve this. Is it an option within Designer?

1 Like

It is a bug and there is another post here about it. (I will link it in an edit shortly) See if you might have done what we did in that post to trigger this bug. If not I really wish you could remember what you did to trigger it. OL needs to know every way this bug is triggered.

EDIT: Here is the post.

Regards,
S

Thanks for your reply.
I did many edits and I probably didn’t realise what had happened immediately. I will monitor it more closely in future.

Please do. We need to find every possible way this issue is triggered so OL can fix it. It can be a dangerous issue.

Regards,
S

I now have a reproducible example.
I have a table which I try and move. When the move is complete all my placeholders have been replaced by data.
I can send my template and datamap if it helps.

Did you move the table in design or preview mode?

When in design or Source mode, the move behaves, when in Preview mode, the problem occurs.

That is what I thought. Preview mode will do the same to boxes too. Thanks.

I can reproduce the problem with boxes too.
Using the outline resources pane, click on an element and drag and drop it higher or lower in the document. The intention is to reorder the elements. The problem occurs if this is done while in preview mode.

Oooooh, that is a new method I have not seen mentioned. I tested it and it does trigger this issue. @hamelj please take note of the above method.

The above method replaces all the placeholders in the template except within tables.
Another way to get the problem with just one placeholder is -
Using the outline resources pane select an element that contains a placeholder and copy and paste it. Inspect the newly pasted (duplicate) element and the placeholder will have been replaced by data if you did it while in preview mode.
This is harder to spot because the little information flag on the script pane “the selector produced no results for the current resource” isn’t triggered (the original element still has a working selector).

I now go to source mode and check after virtually every change.

I’m able to reproduce the Outline view related issue and created a bug report (internal ref: SHARED-69640). Thanks for reporting this. When you find another reproducible method please share it with us.

Erik