AlchemyCMS / alchemy_cms

Alchemy is the Open Source Rails CMS framework for the component based web that can be used as classic server side rendered or headless CMS.
https://www.alchemy-cms.com
BSD 3-Clause "New" or "Revised" License
845 stars 314 forks source link

Nested fixed elements included in non-fixed render #1736

Closed mickenorlen closed 4 years ago

mickenorlen commented 4 years ago

Steps to reproduce

Define a fixed element eg:

- name: blog_index
  fixed: true # Likely you will want the index separated from the normal flow of content
  contents:
    - name: blog_page
      type: EssenceText
      default: Blog
      hint: Only index blog posts under this page
    - name: blog_post_category
      type: EssenceText
      hint: Only index blog posts with this category

Include it in nestable_elements of another element eg:

- name: blog
  unique: true
  contents:
    - name: title
      type: EssenceText
      default: Blog
    - name: text
      type: EssenceText
      default: This is my blog. It's awesome.
  nestable_elements:
    - blog_index

Expected behavior

Should not render alongside non-fixed elements. Add btn should name correctly.

Actual behavior

System configuration

github-actions[bot] commented 4 years ago

Hey. Thanks for reporting this issue and welcome to AlchemyCMS. The maintainer have been notified. Please be patient while waiting for an answer. Open Source is done by volunteers, so give them some time to react. Meanwhile please think about sending a PR that fixes this issue. It is way more likely that it will be accepted than this bug fixed for you. Remember OpenSource is done by all of us. Again, thanks for reporting.

tvdeyen commented 4 years ago

Fixed elements are not meant like this. They are always ever top level elements and cannot be nested inside other elements. Maybe we should add validations to make this more strict and forbid to create elements like this. Want to prepare a PR for this?

mickenorlen commented 4 years ago

Nah, I'm not gonna deal with this now. Just wanted to report it. Close if you want.