Magenerds / PageDesigner

92 stars 41 forks source link

2.2.5 CMS Block Problem #23

Closed jwohlfeil closed 5 years ago

jwohlfeil commented 6 years ago

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.

gewaechshaus commented 6 years ago

Can verify this :( @sydekumf

Exellent1988 commented 6 years ago

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....

gewaechshaus commented 6 years ago

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...

hostep commented 6 years ago

Actually this is broken both in Magento 2.2.4 and 2.2.5 This is due to this commit in the Magento2 repo: https://github.com/magento/magento2/pull/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.

gewaechshaus commented 6 years ago

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

gewaechshaus commented 6 years ago

@hostep - https://github.com/Magenerds/PageDesigner/pull/24 is working well! Big thanks,

Exellent1988 commented 6 years ago

@ 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...