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: PHP Error - Undefined offset: 95 - when adding multiple relationships to bloq

Status Resolved
Add-on / Version Bloqs 4.3.1
Severity
EE Version 4.0.3

Michael Coogan

Jun 19, 2018

Description:
Added a bloq with three nodes. When adding bloq to a page, I’m getting the following error:

Notice
Undefined offset: 95
user/addons/bloqs/libraries/EEBlocks/Controller/TagController.php, line 309

Severity: E_NOTICE

Fatal error: Uncaught TypeError: Argument 1 passed to EEBlocks\Controller\TagController::getContextVariables() must be an instance of EEBlocks\Controller\TagOutputBlockContext, null given, called in /Volumes/WebDev/Dropbox (MC2 Design Group)/MC2 Development 2/htdocs/mc2-2.local/site_root/library/user/addons/bloqs/libraries/EEBlocks/Controller/TagController.php on line 372 and defined in /Volumes/WebDev/Dropbox (MC2 Design Group)/MC2 Development 2/htdocs/mc2-2.local/site_root/library/user/addons/bloqs/libraries/EEBlocks/Controller/TagController.php:608 Stack trace: #0 /Volumes/WebDev/Dropbox (MC2 Design Group)/MC2 Development 2/htdocs/mc2-2.local/site_root/library/user/addons/bloqs/libraries/EEBlocks/Controller/TagController.php(372): EEBlocks\Controller\TagController->getContextVariables(NULL) #1 /Volumes/WebDev/Dropbox (MC2 Design Group)/MC2 Development 2/htdocs/mc2-2.local/site_root/library/user/addons/bloqs/libraries/EEBlocks/Controller/TagController.php(311): EEBlocks\Controller\TagController->_getAndParseCloseContent in /Volumes/WebDev/Dropbox (MC2 Design Group)/MC2 Development 2/htdocs/mc2-2.local/site_root/library/user/addons/bloqs/libraries/EEBlocks/Controller/TagController.php on line 608

Detailed steps to reproduce the issue:
1.
2.
3.

#1

Michael Coogan

Comment has been marked private.

#2

BoldMinded (Brian)

Does this happen if you create a new entry with a similar block layout? Wondering if somehow data is corrupted?

#3

Michael Coogan

Comment has been marked private.

#4

Michael Coogan

Comment has been marked private.

#5

BoldMinded (Brian)

Edit the ticket and upload the screenshot or use Dropbox or something similar and share the url.

#6

Michael Coogan

Comment has been marked private.

#7

BoldMinded (Brian)

Are you using Publisher?

#8

Michael Coogan

Comment has been marked private.

#9

BoldMinded (Brian)

Since we’re working with Relationship fields I want to make sure this isn’t similar to https://boldminded.com/support/ticket/1760, even though Publisher isn’t installed. Backup your DB and run the following query to see if it fixes it.

DELETE FROM exp_relationships WHERE parent_id NOT IN(SELECT entry_id from exp_channel_titles)

If there are any orphaned rows in the relationships table it can cause parsing issues.

#10

BoldMinded (Brian)

Michael, thanks for providing the login info, but I don’t login to environments unless absolutely necessary. The error is happening within some of the nesting code… is this field set to nesting? If not was it previously set to nesting and then changes to not nesting or vice-versa?

#11

BoldMinded (Brian)

Please also point me to the channel and exact entry id in the CP where I can see the Bloqs field in question.

#12

BoldMinded (Brian)

Comment has been marked private.

#13

Michael Coogan

Comment has been marked private.

#14

BoldMinded (Brian)

Soooo… the issue resolved itself b/c you had a partial the same name as a block?

#15

Michael Coogan

Comment has been marked private.

#16

BoldMinded (Brian)

Interesting. Ok. Do you happen to have other partials with the same name as a block? Wondering if that could be causing an issue with the nestable setting too.

#17

Michael Coogan

Comment has been marked private.

#18

BoldMinded (Brian)

Michael, take a look at the last couple of comments in this ticket https://boldminded.com/support/ticket/1765 Does this sound like the situation you’re having? Do you have 2 or more blocks named very similarly?

#19

Michael Coogan

Ya, there were a couple blocks that were named similarly.

#20

BoldMinded (Brian)

Appears to be duplicate of https://boldminded.com/support/ticket/1765

Similarly named blocks are not parsing correctly. Possibly EE issue b/c Bloqs is using EE’s native parsing code.

#21

Michael Coogan

Ok, I’ll check it out. I appreciate your help!

Login to reply