magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.56k stars 9.32k forks source link

CMS Static Block Widget saves the block identifier instead of block ID #38801

Open jansentjeu opened 5 months ago

jansentjeu commented 5 months ago

Preconditions and environment

Steps to reproduce

  1. Go in admin to Content -> Blocks
  2. Create new block for a store
  3. Create another block for another store with the same identifier
  4. Go in admin to Content -> Widgets
  5. Add new widget with type CMS Static Block
  6. Click on the tab Widget Options in the sidebar
  7. Select the block you created in step 3 (the block with the highest ID)
  8. Save the widget
  9. Check the saved block in the widget

Expected result

The block from step 3 is saved in the widget (the block with the highest ID)

Actual result

The block identifier is saved in the database instead of the block ID. This will automatically load the block with the lowest id. In this case, that is the block from step 2

Additional information

This issue was introduced by the change in this commit. This should be reverted. The way the code was before is correct.

Release note

No response

Triage and priority

m2-assistant[bot] commented 5 months ago

Hi @jansentjeu. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

jansentjeu commented 5 months ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 5 months ago

Hi @jansentjeu. Thank you for your request. I'm working on Magento instance for you.

m2-assistant[bot] commented 5 months ago

Hi @engcom-Dash. 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:


magento-deployment-service[bot] commented 5 months ago

Hi @jansentjeu, here is your Magento Instance: https://15208ca800c1614cebc706b4a62d55df.instances-prod.magento-community.engineering Admin access: https://15208ca800c1614cebc706b4a62d55df.instances-prod.magento-community.engineering/admin_9898 Login: b7ce3bb8 Password: a16c0211c6e5

jansentjeu commented 5 months ago

@engcom-Dash Reproduced on 2.4.x. I'm not able to add the label.

engcom-Dash commented 5 months ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 5 months ago

Hi @engcom-Dash. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 5 months ago

Hi @engcom-Dash, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

engcom-Dash commented 5 months ago

Hi @jansentjeu

Thanks for reporting and collaboration.

Verified the issue on Magento 2.4 dev instance and the issue is reproducable.

CMS Static Block Widget saves the block identifier instead of block ID

Preconditions and environment :

  1. Magento version 2.4.7
  2. Make sure you have multiple stores configured

Steps to reproduce :

  1. Go in admin to Content -> Blocks
  2. Create new block for a store
  3. Create another block for another store with the same identifier
  4. Go in admin to Content -> Widgets
  5. Add new widget with type CMS Static Block
  6. Click on the tab Widget Options in the sidebar
  7. Select the block you created in step 3 (the block with the highest ID)
  8. Save the widget
  9. Check the saved block in the widget

Please refer the attached screenshots.

Block identifier "1234" in "Widget parameter column" instead of block id:

Screenshot 2024-06-17 at 5 32 49 PM

Widget in admin:

Screenshot 2024-06-17 at 5 33 19 PM

Block identifiers in admin:

Screenshot 2024-06-17 at 5 36 48 PM
github-jira-sync-bot commented 5 months ago

:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-12168 is successfully created for this GitHub issue.

m2-assistant[bot] commented 5 months ago

:white_check_mark: Confirmed by @engcom-Dash. Thank you for verifying the issue.
Issue Available: @engcom-Dash, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

digitalrisedorset commented 4 months ago

@magento I am working on this