Publisher does not support the Fluid field type. Please do not contact asking when support will be available.

If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.

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.php, line 128

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

Is this a known issue?

 

#1

BoldMinded (Brian)

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)

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

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

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

#5

Vincent Fierant

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)

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)

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

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)

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

#10

Vincent Fierant

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

#11

Vincent Fierant

Comment has been marked private.

#12

BoldMinded (Brian)

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)

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

#14

Vincent Fierant

You were able to reproduce?

#15

BoldMinded (Brian)

Comment has been marked private.

#16

Vincent Fierant

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

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

#18

BoldMinded (Brian)

Comment has been marked private.

#19

Vincent Fierant

Awesome, that build solves the issue!

#20

BoldMinded (Brian)

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

4.0.13 is officially released.

Login to reply