Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🎨 Headless: Make a new base-2019 headless theme #39

Open
bobdenotter opened this issue Oct 23, 2018 · 1 comment
Open

🎨 Headless: Make a new base-2019 headless theme #39

bobdenotter opened this issue Oct 23, 2018 · 1 comment
Labels
needs splitting Issue is too big: Needs to be split up into several smaller issues topic: API All issues dealing with API-Platform topic: Frontend

Comments

@bobdenotter
Copy link
Member

No description provided.

@bobdenotter bobdenotter added topic: API All issues dealing with API-Platform topic: Frontend needs splitting Issue is too big: Needs to be split up into several smaller issues labels Oct 23, 2018
@jackiboy
Copy link
Member

I think the API needs to be more finalised before we begin work on this

@bobdenotter bobdenotter changed the title Headless: Make a new base-2019 headless theme 🎨 Headless: Make a new base-2019 headless theme Oct 26, 2018
@bobdenotter bobdenotter added this to the Bolt 4 beta 2 milestone Nov 26, 2018
@JarJak JarJak modified the milestones: Bolt 4 beta 2, Bolt 4.1 Apr 14, 2019
@I-Valchev I-Valchev modified the milestones: Bolt 4.1, 🔥 Backburner Feb 1, 2021
dadaxr added a commit to dadaxr/core that referenced this issue Mar 28, 2022
since v5.1.5, commit bolt#3122  when number field "mode" is "float" (which is by default), the step is "'any'" by default (note the single quote wrapped by the double quote).  
This "'any'" value should not be escaped because it breaks when the number field is used within a collection. 

For instance, bellow is an extract of an "editor-collection" component generated by the backend when using a collection field having "number" field as child,
we can see it use a :template prop filled with escaped templates of fields members : 
```
 <editor-collection
      :existing-fields='[]'
      :templates='[{ ..  &lt;editor-number  ...  value=\&quot;\&quot;\n    :step=\&quot;&amp;bolt#39;any&amp;bolt#39;\&quot;\n    ...'
      :labels='...'
      :limit='200'
      :name="&quot;gallery_slider_images&quot;"
      :variant="&quot;collapsed&quot;"
    ></editor-collection>
```

Without applying a |raw filter, the value is double encoded and generates :
 
`:step=\&quot;&amp;bolt#39;any&amp;bolt#39;\&quot;`  (which decoded is the same as `:step=\"&bolt#39;any&bolt#39;\"`

instead of `:step=\&quot;&bolt#39;any&bolt#39;\&quot;` (which decoded is the same as `:step=\"'any'\"`)

This leads to a vue compilation error : 

```
[Vue warn]: Error compiling template:
 ...
<editor-number :id='&quot;field-gallery_slider_images-slider_image_set-6241de74820e3-coord_y&quot;' name="collections[gallery_slider_images][slider_image_set][6241de74820e3][coord_y]" value="" :step="&bolt#39;any&bolt#39;" :required="false" :readonly="false" :errormessage="false" :pattern="false" :placeholder="&quot;&quot;" ></editor-number>
...
- invalid expression: expected expression, got '&' in &bolt#39;any&bolt#39; Raw expression: :step="&bolt#39;any&bolt#39;"
```

However when using number field directly (ie without a collection field) it's was working. 

Using the |raw filter makes it work in both cases.

Note : this regression can lead to data loss when saving broken collections ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs splitting Issue is too big: Needs to be split up into several smaller issues topic: API All issues dealing with API-Platform topic: Frontend
Projects
None yet
Development

No branches or pull requests

4 participants