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: Elements found with non-unique ID

Status Resolved
Add-on / Version Bloqs 4.0.1
Severity
EE Version 4.2.3

Bloom Agency

May 24, 2018

Description:

Hi, I’m having a few issues with a couple of fields not validating correctly within EE using bloqs.

We are using a couple custom fields within EE and I believe these are causing the issues. Maybe I’ve added them incorrectly to fieldtypes.xml but I’m not too sure. The two fields are the native add-on of RTE and a custom one called ‘Zeal Colour Picker’ which we updated from EE2 to work with EE4. I’ll attach my main functions file for that addon as well as it’s very small and may be useful in debugging.

On adding a new bloq field to a new page, validation is thrown on both RTE fields and Zeal Colour Picker fields due to duplicate ID’s (screenshot attached of the error)

Any idea on where to start with this one?

Thanks,

 

#1

BoldMinded (Brian)

You shouldn’t edit the fieldtypes.xml, thats strictly for fieldtypes that Bloqs handles natively. Are you sure which fieldtype that error is coming from? As far as I know the RTE field should be working fine with Bloqs, so I’m guessing its the color picker that is having issues. Make sure you’ve reviewed the developer docs https://eebloqs.com/documentation/developers. If you’re relying on a lot of JS for the fieldtype, then you may have to take some additional steps, very similar to what you do to make it work in Grid (in fact if it works in Grid it should work in Bloqs). See https://docs.expressionengine.com/latest/development/fieldtypes.html#grid-javascript-events

#2

Jaywing Developers

Hi,

Understood, sorry must have missed that documentation before. I’ve reverted to the original fieldtypes xml. Only needed to update the accepts function to allow for bloqs. Looks like the grid_display_field function is set up correctly already along with display_field.

Doing all this still allows for the fieldtype to be visible and working however a whole stream of errors are now thrown on validation. you can view them in the attached screenshot. Any idea what it could be?

https://imgur.com/a/VggxNbh

Thanks,

#3

BoldMinded (Brian)

Try upgrading to the latest version 4.0.3 first.

#4

BoldMinded (Brian)

Is that an existing entry that you edited when you had your hacks in place to make the field “work” in Bloqs? Or is that a new field?

#5

Jaywing Developers

Hi,

I’ve updated to 4.0.3 and performed the changes via the documentation in order to get zeal colour picker field working. It doesn’t throw any errors when creating new entries / bloqs. However, the non-unique ID issue is still present. As mentioned before it is only affecting textarea (so RTE native addon) and zeal colour picker (third-party addon). Is there anything else I can possibly try?

The issue is now that because of those fields throw errors and don’t validate correctly a lot of the time when saving an entry the bloqs lose their indentation or worse on extreme cases, lose all of their content. This is a pretty serious issue for us as if we lose content on a live server it can have serious impacts.

Curiously as well. Do you have any means of transfering local bloqs layouts to a staging or live server? The way I’m doing it at the moment is exporting/dropping/restoring the blocks_block, blocks_blockdefinition & blocks_atomdefinition tables for the newer changes, is the best way to do this or is there a better best practice?

Thanks,

#6

BoldMinded (Brian)

Can you edit the ticket and provide a CP and FTP login to a dev or staging site where this is happening? If so point me to an entry_id in which this is occurring.

There isn’t a way to migrate block definitions between servers, sorry. If the table changes are working for you then I’d say stick with that.

#7

BoldMinded (Brian)

Also, does this happen when ONLY the RTE field is in a blocks field? E.g. is something in Zeal causing the problem? I just created a nested blocks field with RTE and did not see any errors at any point during creation, validation, saving, or re-display of the blocks.

#8

Jaywing Developers

Hi,

It looks like it only happens on bloq layouts that contain both a RTE and a Zeal Colour Picker field, however I can’t be totally sure of that. I’d love to be able to provide you FTP / CP access but due to staging/live being on a client server I cannot provide this information, additionally the local developer environment is only accessible internally via our office.

I will attach my addon for zeal colour picker field (in original ticket - I’ll also record a video of the errors I am getting) in an attempt you can recreate this bug. In addition to this I am running a clean version of EE on 4.2.3, the only other addons that I am using are as follows:

Native - RTE 1.0.1 Third Party - Bloqs 4.0.3 Third Party - Publisher Lite 2.8.2 Third Party - Structure 4.3.15 Third Party - Zeal Colour Picker FIeld 1.0

Let me know if I can be of any more help and provide anything else.

Thanks,

#9

Jaywing Developers

Comment has been marked private.

#10

Jaywing Developers

Hi,

If the above doesn’t work for you, let me know and I will organise a ngrok URL for you with my gulp setup.

Thanks,

#11

BoldMinded (Brian)

If the error occurs only when Zeal Color Picker is on the page, then odds are its a problem with that field type, not Bloqs. I would report the issue to the Zeal team, its their responsibility to make the field type compatible with Grid, Bloqs, Matrix etc.

I looked at the source code and it does not appear to have any JavaScript necessary to support the Grid field (https://docs.expressionengine.com/latest/development/fieldtypes.html#grid-javascript-events). It won’t work in Bloqs until it works in Grid. They advertise it working in Grid, but from my test it does not work correctly. It only works in an existing Grid row, if you add a new row, it breaks. https://www.dropbox.com/s/lp54ytp0qbfcr0e/Screenshot 2018-06-06 07.52.11.png?dl=0

#12

BoldMinded (Brian)

I’m going to close this b/c I feel like the issue is with the Zeal Color Picker fieldtype, not Bloqs itself.

Login to reply