mirasvit / module-blog

Magento 2 Blog Extension
https://mirasvit.com/magento-2-extensions/blog.html
Open Software License 3.0
67 stars 48 forks source link

Fatal error when creating or editing blog post when pagebuilder is not installed. #171

Closed helloeverything closed 4 years ago

helloeverything commented 4 years ago

I'm getting a fatal error on an Magento Open Source 2.3.3 where PageBuilder is NOT installed. Looks like the recent merge caused it - https://github.com/mirasvit/module-blog/pull/167/files, could this be updated?

  1. Install version 1.0.34
  2. Goto create a blog post.

2 exception(s): Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid block type: Magento\PageBuilder\Block\WysiwygSetup Exception #1 (ReflectionException): Class Magento\PageBuilder\Block\WysiwygSetup does not exist

2 exception(s):
Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid block type: Magento\PageBuilder\Block\WysiwygSetup
Exception #1 (ReflectionException): Class Magento\PageBuilder\Block\WysiwygSetup does not exist

Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid block type: Magento\PageBuilder\Block\WysiwygSetup
<pre>#1 Magento\Framework\View\Layout\Generator\Block->createBlock() called at [vendor/magento/framework/View/Layout/Generator/Block.php:226]
#2 Magento\Framework\View\Layout\Generator\Block->generateBlock() called at [vendor/magento/framework/View/Layout/Generator/Block.php:134]
digitalbricklayer commented 4 years ago

I have reproduced this as well. You can reproduce with Magento 2.3.4 open source + Mirasvit Blog 1.0.34. Even on the paid for versions of Magento, the Page Builder module is an optional module.

Here are the relevant entries from my system.log when I try to edit an existing blog post. the same happens when I try to add a new blog post.

[2020-02-04 13:51:18] main.CRITICAL: Invalid block type: Magento\PageBuilder\Block\WysiwygSetup [] []
[2020-02-04 13:51:18] main.CRITICAL: Class Magento\PageBuilder\Block\Adminhtml\Html\Head\BabelPolyfill does not exist [] []
[2020-02-04 13:51:18] main.CRITICAL: Invalid block type: Magento\PageBuilder\Block\Adminhtml\Html\Head\BabelPolyfill [] []
4ctobias commented 4 years ago

Reproduced this also on a Magento 2.2.11 - a 2.2.10 was fine.

The problem for us is the

<referenceContainer name="before.body.end">
  <uiComponent name="pagebuilder_modal_form"/>
</referenceContainer>

in the view/adminhtml/layout/blog_post_edit.xml as mentioned by @helloeverything

helloeverything commented 4 years ago

As a temporary fix, you can lock down the module to the previous version (1.0.33).

Update composer.json file "mirasvit/module-blog": "1.0.33"

then run composer update mirasvit/module-blog

digitalbricklayer commented 4 years ago

@helloeverything - I am going to monkey patch the file manually. I will lose another fix if I downgrade 1.0.33.

istoutjesdijk commented 4 years ago

Does anyone know how to quick fix this till we get the official fix in the next update?

digitalbricklayer commented 4 years ago

Yes @istoutjesdijk. What I did last night is patch my live server with the changes made to the fix/pageBuilderIssue branch. There are just two files you need to change. Just remember to run the compile again when you're done.

adrok commented 4 years ago

fixed in version 1.0.35