Magenerds / PageDesigner

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

2.2.5 CMS Block Problem

jwohlfeil opened this issue · comments

After upgrading to 2.2.5 cms blocks are not ssaved correctly anymore cms_block.content is empty in the DB. Plugin/Cms/Model/Block/BlockPlugin.php > beforeSave() is not called.

Can verify this :( @sydekumf

I cant use the Pagedesigner on 2.2.5 as well but i have some more troubles than that.

now i can thanks to the fix in #15

but when i save then the layout will be saved but nothing in there....

but when i save then the layout will be saved but nothing in there....

@Exellent1988 - that's related to the issue @jwohlfeil opened up. The plugin should wrap the saveBefore method around the related core methods which doesn't seem to happen in 2.2.5...

Actually this is broken both in Magento 2.2.4 and 2.2.5
This is due to this commit in the Magento2 repo: magento/magento2#13796
Basically: saving of a block changed from using the Block model itself to using the BlockRepository's save method. Which then in turn calls the Block Resource Model's save method instead of the Block Model's save method.

We basically have to apply this change which was done for Pages to the Blocks as well.
This should in theory be backwards compatible with older Magento versions and fix the issue in Magento 2.2.4 and 2.2.5.

I'm currently preparing a PR which should accomplish this, need to do some testing in various Magento versions to verify it keeps working, but it looks pretty good at the moment.

Thumbs up @hostep - I just found the time to implement logging :) So many thanks from my side!

@hostep - #24 is working well! Big thanks,

@ all thanks for the effort to getting this plugin as awseome as it seems.
i just installed the latest release but i still get this error in the console:
Uncaught TypeError: Cannot read property 'click' of undefined at UiClass.onColumnContentSet (page_designer.js:345) at UiClass.retrieveColumnContent (pdClass.js:918) at UiClass.<anonymous> (pdClass.js:310) at HTMLDivElement.<anonymous> (pdClass.js:1181) at HTMLDivElement.dispatch (jquery.js:5226) at HTMLDivElement.elemData.handle (jquery.js:4878)
any suggestions what i have to do to make it work?

so even if i change the line:
wysControl.find('.mceButton.mce_magentowidget').get(0).click();
to
wysControl.find('.action-add-widget').get(0).click();
i then can click the plus icon, but whatever i set it does not get saved...
and it it doen't show up in the pagedesigner as well..
neither @ the blocks nor the pages...