Magento2: Can not save "CMS Block" with empty content

Created on 20 Jul 2019  路  14Comments  路  Source: magento/magento2


Fill All Required Field but can not save CMS Block.

We can save the CMS Page with the empty content but we can not save 'CMS Block' with empty content. We should remove the validate in CMS Block form (like the CMS Page) (And as it displays - with no required symbol).

Preconditions (*)

  1. Magento 2.3-develop

Steps to reproduce (*)

  1. Go to Backend.
  2. Select Content->Blocks->Add New Block
  3. Fill all required field with '*'
  4. Click Save

test

Expected result (*)

  1. Save successfully with the empty content

Actual result (*)

  1. No thing happened. No notification.
Backend Cms Fixed in 2.3.x Clear Description Confirmed Format is valid Ready for Work Reproduced on 2.3.x

Most helpful comment

Hi @edenduong. Thank you for the report. Definitely, there's an issue. But the issue is rather in the absent validation message than in the saving a CMS block with an empty message.
We should carefully think about the use cases of empty CMS blocks. I can't figure out many of them (an empty CMS page has much more use cases though).
On the other hand, there's a possibility that store admin creates a CMS block and forgets to put content. This scenario may result in additional time for looking for the empty block in page contents.
So my point here is, we should fix the validation message for the empty content block instead of allowing empty blocks.

All 14 comments

Hi @edenduong. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • [x] Summary of the issue
  • [x] Information on your environment
  • [x] Steps to reproduce
  • [x] Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.3-develop instance - upcoming 2.3.x release

For more details, please, review the Magento Contributor Assistant documentation.

@edenduong do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • [x] yes
  • [ ] no

@magento give me 2.3-develop instance

Hi @edenduong. Thank you for your request. I'm working on Magento 2.3-develop instance for you

Hi @edenduong, here is your Magento instance.
Admin access: https://i-23800-2-3-develop.instances.magento-community.engineering/admin
Login: admin Password: 123123q
Instance will be terminated in up to 3 hours.

@krishprakash: Please confirm for me this issue :)

Hi @krishprakash. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

  • [x] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.
  • [x] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • [x] 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • [x] 4. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!

  • [x] 5. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • [x] 6. Add label Issue: Confirmed once verification is complete.

  • [x] 7. Make sure that automatic system confirms that report has been added to the backlog.

@magento give me 2.3-develop instance

Hi @krishprakash. Thank you for your request. I'm working on Magento 2.3-develop instance for you

Hi @krishprakash, here is your Magento instance.
Admin access: https://i-23800-2-3-develop.instances.magento-community.engineering/admin
Login: admin Password: 123123q
Instance will be terminated in up to 3 hours.

:white_check_mark: Confirmed by @krishprakash
Thank you for verifying the issue. Based on the provided information internal tickets MC-18364 were created

Issue Available: @krishprakash, _You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself._

Hi @edenduong. Thank you for the report. Definitely, there's an issue. But the issue is rather in the absent validation message than in the saving a CMS block with an empty message.
We should carefully think about the use cases of empty CMS blocks. I can't figure out many of them (an empty CMS page has much more use cases though).
On the other hand, there's a possibility that store admin creates a CMS block and forgets to put content. This scenario may result in additional time for looking for the empty block in page contents.
So my point here is, we should fix the validation message for the empty content block instead of allowing empty blocks.

Hello @rogyar,
Thank you for your feedback.
I think we can use the empty CMS block. Because the admin or developer can create the page with the empty block for the layout (the content staff can modify it later.). The layout with some empty block content which the staff can add it depends on their requirements. It may be useful for preparing the website page.
I see in the DB, that field also "Can be null":

image

As the CMS Page, I think we also can leave them empty .

Hi @edenduong. That makes sense. Another use case that comes in mind is for some languages the store owner might want to have the content empty. Thank you for providing the additional info.

Hi @edenduong. Thank you for your report.
The issue has been fixed in magento/magento2#23801 by @edenduong in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming 2.3.4 release.

Was this page helpful?
0 / 5 - 0 ratings