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: Errors when dragging bloq nodes
Status | Resolved |
Add-on / Version | Bloqs 4.1.1 |
Severity | |
EE Version | 5.3.0 |
MLohrman
Jan 14, 2020When dragging blocks around, things get funky. Errors appear in the Chrome browser console. I have a video uploaded here (https://www.dropbox.com/s/w5oxwqefvx3uudz/bloqs_draganddrop_issue_vf1080.mp4?dl=0) that shows what happens and the errors in the console. Please let me know if you need any other information. Thanks!
BoldMinded (Brian)
Jan 14, 2020
Hi, Mike. Can you copy the error from the console and paste in here? Also list out what types of field types are inside those blocks being dragged. Lastly, does this happen only when dragging nested blocks?
MLohrman
Jan 14, 2020
Brian, it seems to work ok dragging block that aren’t nested and don’t have bloqs nested within. If I try to drag a top-level bloq that has nested elements, it messes up.
This is the error that happens when I try to drag after getting the first error…
MLohrman
Jan 14, 2020
Fields used in bloqs…
Ansel
Wygwam
Toggle
Text
MLohrman
Jan 14, 2020
There’s 4 separate bloqs fields on this publish form if that matters
BoldMinded (Brian)
Jan 14, 2020
What happens if you drag nested blocks that have only a basic text field in them, nothing complex or 3rd party?
BoldMinded (Brian)
Jan 15, 2020
So that error makes me believe that EE’s local Underscore JS library is not getting loaded for some reason. This isn’t happening locally for me in 2 different environments. Have you tried this in a new EE install, or at least in an entry that has _only_ a Bloqs field and nothing else? Something is stopping EE from loading the Underscore library, and I’m not sure what that would be. The only thing I can think of to try is to change the js load order on line 162 of ft.bloqs.php to this:
The old order is tree-validation.js, then cp.js, but it has been like that for 2+ years with no known issues. If swapping that load order doesn’t fix it then there is probably something else in your environment that is wrong.
MLohrman
Jan 15, 2020
Before updating the ft.bloqs.php file as you mentioned above, I tested things on a development version of the site. Same issue on the development site. I created a new channel with just the bloqs field with the same bloqs fields within. When adding bloqs and drag dropping them, it produced no errors.
I then created a new channel with all the fields from the suspect channel and have the same issue, but getting a different error I’ll paste below. Updating the ft.bloqs.php file made no change. If this doesn’t help you. So maybe some other field is interfering? I figure my next step could be to start removing fields from the channel and see if that helps.
BoldMinded (Brian)
Jan 15, 2020
I just double checked locally that the underscore library is in fact loaded every CP request in cp.php -> set_default_view_variables(). Make sure the following files exist in your repo: ee/asset/javascript/src/underscore.js or ee/asset/javascript/compressed/underscore.js. Have you tried a new EE install with Bloqs? I’m not sure what else to debug at this time b/c this really sounds like an issue with the environment, not Bloqs.
MLohrman
Jan 16, 2020
Brian, I don’t see that path in my files, there’s no “asset” folder in the system/ee folder. Unless I’m looking in the wrong spot? I’m doing some testing now, removing different fields to see if it eventually starts working to see if there is a conflict.
BoldMinded (Brian)
Jan 16, 2020
Search your themes folder for “function findWhere”, or check you full project for underscore.js to see if it exists. I just double checked and the path should be /themes/ee/asset/javascript/compressed/underscore.js.
BoldMinded (Brian)
Jan 16, 2020
Sorry, search for “findWhere=function”
MLohrman
Jan 16, 2020
Ok, I think I found the issue, currently running v6.0 of Gmaps plugin(https://docs.reinos.nl/gmaps/#changelog) and v4.0 of Gmaps fieldtype(https://docs.reinos.nl/gmaps-fieldtype/#changelog) and have the field in that channel. When I removed it from the channel the drag/drop started working again. Add it back, it breaks again. There is a newer version of both, but my license has expired for these and it is recommended to use their other, newer maps plugin, which I purchased a license for, but haven’t gotten around to implementing. So, updating to the newer version of these plugins might help, or implementing the newer plugin might help, will have to do one or the other. Thanks for hangin in there with me on this support request.
MLohrman
Jan 20, 2020
Rein, dev of the Gmaps plugin is going to take a look at things on his side, I’ll let you know if he finds anything.
BoldMinded (Brian)
Jan 20, 2020
Sounds good. Let me know if what he finds is relevant for me and I’ll take a look. I’m going to go ahead and close this ticket. You can reopen it later if you need to.