EE4 compatibility updates:

  • Publisher is EE4 and EE5 compatible, but it does not currently support the Fluid field.
  • Reel is EE4 and EE5 compatible, but it does not currently support the Fluid field.

Ticket: Preview mode: Unable to load the requested class: rte_lib

Status Resolved
Add-on / Version Bloqs 4.0.11
Severity
EE Version 5.0.1

Vincent Fierant

Nov 26, 2018

Description:
I’m working on a site in development, clean install of latest versions of both EE and the addon.
I’ve created a channel with a bloqs field. This works perfectly. However, if I try to “Live Preview” the channel entry, I get the following error:

Warning
Invalid argument supplied 
for foreach()
user/addons/bloqs/libraries/EEBlocks/Helper/TreeHelper.phpline 128

Severity
E_WARNING
{
"error":"Unable to load the requested class: rte_lib"

Is this a known issue?

 

#1

BoldMinded (Brian)

Nov 26, 2018

Try upgrading to 4.0.12 first. I just spent an extensive amount of time testing a bug with the Live Preview and never encountered this error.

#2

BoldMinded (Brian)

Nov 26, 2018

Also provide more information about the Bloqs field(s) on our publish page that you’re trying to preview. I need to be able to replicate the issue.

#3

Vincent Fierant

Nov 26, 2018

Upgrading to 4.0.12 did not resolve the issue.

The channel has one Bloqs field.
I’ve defined two blocks, one with text input and rich text editor (named Title with text, shortname title_with_text) and one with text input, rich text editor and file (image) (named Title with text and background, shortname title_with_text_and_background).

No other add-ons present. I would share the environment with you, but it’s local (on my mac).

#4

Vincent Fierant

Nov 26, 2018

The issue is only present in Live Preview. On the front end it renders without any error messages.

#5

Vincent Fierant

Nov 26, 2018

The error points to line 128 in TreeHelper.php, this block:

foreach ($tree as $block{
            $this
->treeData[$block['id']] [
                
'order' => $order,
                
'parent_id' => ($block['parent_id'!== '' $block['parent_id'0),
                
'depth' => $block['depth'],
                
'lft' => $block['lft'],
                
'rgt' => $block['rgt'],
            
];

            
$order++;

If I do var_dump($tree) the output is NULL. Don’t know if that helps…

#6

BoldMinded (Brian)

Nov 26, 2018

I can tell what line of code its at, I mean what does your Bloqs field look like on your publish page? What blocks are you adding? Are they nested or not? Can you provide a screenshot?

#7

BoldMinded (Brian)

Nov 26, 2018

You can also inspect the publish page and make sure there is a hidden field called “tree_order” within the Bloqs field. If it’s not there, then that can point me to the problem.

#8

Vincent Fierant

Nov 26, 2018

Here’s a screenshot from the preview publish panel without any blocks added:
https://imgur.com/a/Gtbbk5h

And this is what happens if I add a block:
https://imgur.com/a/2pJpz0j

#9

BoldMinded (Brian)

Nov 26, 2018

What about the tree_order field? It’ll look like this: https://d.pr/i/dVZGhz

#10

Vincent Fierant

Nov 26, 2018

Yep, it’s there:
https://imgur.com/a/jYWX2y0

#11

Vincent Fierant

Nov 26, 2018

Comment has been marked private.

#12

BoldMinded (Brian)

Nov 26, 2018

No, I don’t do remote debugging like that. Thanks though.

What happens to the value of that tree_order field if you make it a nested field add add a child block?

#13

BoldMinded (Brian)

Nov 26, 2018

Never mind, you don’t need to do that. I can replicate it locally.

#14

Vincent Fierant

Nov 26, 2018

You were able to reproduce?

#15

BoldMinded (Brian)

Nov 26, 2018

Comment has been marked private.

#16

Vincent Fierant

Nov 26, 2018

The ThreeHelper.php error message is gone, but the {“error”:“Unable to load the requested class: rte_lib”}  is still there and the preview post throws a 500 error, see screenshots below:

https://imgur.com/a/BTxgsao

#17

Vincent Fierant

Nov 26, 2018

If I remove the Rich Text Editor (RTE) field type from the block, the error is gone and Live Preview works.

#18

BoldMinded (Brian)

Nov 26, 2018

Comment has been marked private.

#19

Vincent Fierant

Nov 26, 2018

Awesome, that build solves the issue!

#20

BoldMinded (Brian)

Nov 26, 2018

Cool smile I’ll go ahead and close this out.

4.0.13 is officially released.

Login to reply

Contact

For add-on support, please use the Support section. General inquries and pre-sale questions can be sent to support@boldminded.com.