[CONTEDIT-516] It is not possible to add blocks to stories Created: 13/Feb/23  Updated: 19/Mar/23  Resolved: 07/Mar/23

Status: Closed
Project: Content Editor
Component/s: None
Affects Version/s: 2.1.3
Fix Version/s: 2.2.0, 2.1.4

Type: Bug Priority: Neutral
Reporter: Joaquin Alfaro Assignee: Oanh Thai Hoang
Resolution: Fixed Votes: 0
Labels: None
Σ Remaining Estimate: 0d Remaining Estimate: 0d
Σ Time Spent: 1d 5.25h Time Spent: 1d 5.25h
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Attachments: File CONTEDIT-516.webm    
Issue Links:
Problem/Incident
Sub-Tasks:
Key
Summary
Type
Status
Assignee
CONTEDIT-517 Implement Sub-task Closed Oanh Thai Hoang  
CONTEDIT-518 Review Sub-task Closed Lam Nguyen Bao  
CONTEDIT-519 piQA Sub-task Closed Lam Nguyen Bao  
CONTEDIT-520 QA Sub-task Closed Lam Nguyen Bao  
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[X]* Steps to reproduce, expected, and actual results filled
[X]* Affected version filled
Date of First Response:
Epic Link: AuthorX Support
Story Points: 3
Team: AuthorX
Work Started:

 Description   

Steps to reproduce

  1. Create a new story in https://demo.magnolia-cms.com/ without adding a block and save
  2. Add a new block to the story created above and save changes
  3. Close the tab where the story is opened
  4. Edit the story.
  5. Buttons Save and Save and publish are disabled

Expected results

The buttons Save and Save and publish are enabled and it is possible to save changes.

Actual results

It appears the following warning:

Since version 2.1 of the Content Editor module, the blocks in the Stories app can handle internationalized content. The current block structure is incompatible with the i18n configuration of the 'blocks' field in the app. Please ask your developer to set 'i18n: false' for the field.

And buttons Save and Save and publish are disabled

Workaround

Create the node blocks inside the story

Development notes

It seems that node blocks is not added when stories are created - at least on version 2.1.3-



 Comments   
Comment by Joaquin Alfaro [ 13/Feb/23 ]

The problem can be solved defining the following decorator for stories-app:

subApps:
  editor:
    form:
      properties:
        blocks:
          itemProvider:
             $type: jcrChildNodeProvider

Is it possible that the origin of the problem is the itemProvider info.magnolia.editor.block.jcr.CompatibleBlockProvider?

Comment by Laura Delnevo [ 14/Feb/23 ]

Hi jalfaro2 I tried to reproduce the problem but I wasn't able to replicate the issue, pls see CONTEDIT-516.webm 

Comment by Joaquin Alfaro [ 14/Feb/23 ]

Thanks @Laura! you are right but to reproduce the issue, the story must be saved before adding the first block.

I didn't try to add a block at the moment of creating the story but probably it's a usual practice and the reason that this issue almost ever is reproduced.

Comment by Laura Delnevo [ 15/Feb/23 ]

Yup that worked, thanks jalfaro2 I can reproduce now 

Generated at Mon Feb 12 00:21:10 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.