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?
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.
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.
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).
Vincent Fierant
The issue is only present in Live Preview. On the front end it renders without any error messages.
Vincent Fierant
The error points to line 128 in TreeHelper.php, this block:
If I do var_dump($tree) the output is NULL. Don’t know if that helps…
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?
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.
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
BoldMinded (Brian)
What about the tree_order field? It’ll look like this: https://d.pr/i/dVZGhz
Vincent Fierant
Yep, it’s there: https://imgur.com/a/jYWX2y0
Vincent Fierant
Comment has been marked private.
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?
BoldMinded (Brian)
Never mind, you don’t need to do that. I can replicate it locally.
Vincent Fierant
You were able to reproduce?
BoldMinded (Brian)
Comment has been marked private.
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
Vincent Fierant
If I remove the Rich Text Editor (RTE) field type from the block, the error is gone and Live Preview works.
BoldMinded (Brian)
Comment has been marked private.
Vincent Fierant
Awesome, that build solves the issue!
BoldMinded (Brian)
Cool 😊 I’ll go ahead and close this out.
4.0.13 is officially released.