strange bug grid inside low variables
EE 2.11.1
LV 2.6.1
Hi, I was banging my head with this and finally found the culprit, (at least i believe i did)
I have only 12 entries in one channel, and some LV's, when looking at the rendered page, all entries but one were displaying okay, in one specific entry (6) the LV field which contains a grid was not showing up.. .
I then created another entry and all showed up, but the entry_id gap bothered me :)., so i tinkered with the DB and found out that from some reason this entry was not showing up because it shared the entry id in the low variable grid field.
so my exp_low_varaibles_grid_field_6 looks like this:
and this variable_id in exp_low_variables table is 6 (which is not so relevant/0
the fact the entry_id 6 was not showing up correctly made me think this could be the problem.
not sure how its suppose to work, but shouldn't the auto_increment of exp_titles should be updated?
am I correct in my assumptions? please let me know how I can fix this or prevent it from happening again , or is it a grid bug ?
Replies
TechNinja 10 Jun 2016 07:33
also, when deleting this LV field (which in DB is exp_low_variables_grid_6)
it also deletes the content of a channel regular grid field which is (exp_channel_grid_field_6)
this is very disturbing I need urgent help please.. while I do have only 12 entries, they contain a LOT of fields and data. I don't want to lose that.
Low 10 Jun 2016 08:36
This is a bug in Grid in combination with EE's content type feature.
Even though I'm telling Grid to focus at the Low Variables content type, it tries to delete *all* content types with that ID. That's not something I can fix from within LV.
For now, if you want to delete the var safely, you can change the var type to a Textarea and then delete it. Then, you could manually delete the exp_low_variables_grid_field_6 table.
TechNinja 10 Jun 2016 16:25
- does Ellislab know about this ? should I be contacting them ?
- what about the entry_id conflict? right now if I delete this field and recreate it, it means the next entry i'll be adding in my channel will not be able to display that LV content.(it comes out empty)
this means I cant use Grid with LV at all.
- is this a new bug? I don't recall this on my other sites using older versions.
Low 10 Jun 2016 16:40
I'm not sure if EllisLab knows this. You should definitely contact them to make sure. The issue does sound vaguely familiar, but has probably been addressed since EE3. Nevertheless, the issue still stands for EE2, obviously.
The entry_id conflict shouldn't exist in the first place. The entry_id in the exp_low_variables_grid_field_x table actually refers to the variable_id in the exp_global_variables and exp_low_variables table. The 'low_variables' bit in the exp_low_variables_grid_field_x table is the defined content type. The problem therefore seems to be all centered towards Grid not differentiating between content types well enough.
Not sure if it's a new bug, but it definitely is an edge case, where IDs between two content types are conflicting.
TechNinja 10 Jun 2016 16:56
Low, is there anyway you can raise this issue with them? by looking at the forums your posts are being replied to light years faster than mine. :)
Low 10 Jun 2016 17:03
If I'm gonna do that, I need to reproduce the issue locally first. Can you send me SuperAdmin and FTP access so I can see your case exactly? I'll then try to mimic that environment here and file a bug report accordingly.
Low 10 Jun 2016 17:08
Oh, you can send the login credentials to hi at gotolow dot com, if you can.
Low 11 Jun 2016 09:31
Okay, I found the bug in EE's code and managed to find a solution for it, too.
Please refer to this bug report: https://support.ellislab.com/bugs/det...
TechNinja 11 Jun 2016 18:46
Thank you!!
TechNinja 29 Sep 2016 23:47
Hi Low,
not sure what happend but this issue came back;
I've created a new grid field inside LV, and then deleted it. it also deleted the native grid field with the same id (the fixed file you sent me is still there)
any thoughts ?
Low 30 Sep 2016 07:49
Hmm, no thoughts other than that this still is an issue with Grid/EE itself (or its API), rather than LV. As mentioned before, LV tells Grid to delete the field based on ID and content type. If Grid/EE ignores that, there's not much I can do...