Closed meegido closed 5 months ago
This is a condition where, when the SharedID starts with a number, the Q encoder puts quotes in front of it to signal it's a string.
Some components may not be taking this into account, the {list} component could be one of them. The way to reproduce this requires values that start with a number which cannot be ensured, so maybe this needs some manual editing of SharedIDs.
The priority reflects not the level of criticality for the bug, but deadlines around a project that is failing due to this problem.
Given the value is being interpolated, the responsibility of embedding the sharedId is of getPageAssets, which replaces the expression directly with the computed data, after that markdownDatasets tries to decode to fetch the search and the error is produced.
The simpler and fastest solution is to wrap the expression into apostrophes in the URL of the dataset as
(values:!('
${entity.sharedId}'
)) in the markdown of the page.
The alternative in code, which I think is not correct, can be to wrap the result of the expression entity.sharedId
into apostrophes at the moment of parsing the markdown, for me the first option is safer than the second because we can't anticipate the intended use of that expression in the markdown of a page.
@RafaPolit @meegido
The simpler solution fix works very well 👏 As a side note, it would be great to document it so you don't need to remember each time.
Thank you so much @mfacar!
Describe the bug The charts and library-embedded cards on an entity page do not always show the data on all entity pages. This happens when the
shared
is interpolated with special characters (values:!(%27sharedId%27)
) and we do it in the Dataset and Library-embed ({list}
) components.To Reproduce Steps to reproduce the behavior:
(values:!(${entity.sharedId}))
Expected behavior There is consistency in presenting the information on all entity pages when using the entity id for showing charts.
Screenshots Sometimes this error appears in the browser console.
Device (please select all that apply)
Browser What browser where you using All.
Additional context Add any other context about the problem here.