All add-ons currently require PHP 7.4 or greater.

On July 4th 2024 PHP 8.2 will be the new minimum requirement for all add-ons. Expect any add-on released after that date to require 8.2 or greater. Some releases may not immediately take advantage of 8.x specific features in PHP, which means you might, be able to continue using new releases in PHP 7.4, however, if you experience an error the first thing you should do is update to PHP 8.2 then create a support ticket if the error persists.

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: Error messages when using Blocks

Status Resolved
Add-on / Version Publisher 1.6.11
Severity
EE Version 2.9.0

Hop Studios

Aug 09, 2016

Hi,

I’m using Blocks with Publisher and I’m having issues.

First, I was on 1.6.6, Blocks wasn’t saving relationship fields properly. I update Publisher to 1.6.11 because I was that a version was fixing this issue.

But now I’m having a new one. When I click Publish after setting up an entry with a Blocks field, I got a blank page with php errors :


A PHP Error was encountered

Severity: Notice

Message: Undefined index: col_id_21_hidden_file

Filename: fieldtypes/Publisher_blocks.php

Line Number: 27
A PHP Error was encountered

Severity: Notice

Message: Undefined index: col_id_21_hidden_dir

Filename: fieldtypes/Publisher_blocks.php

Line Number: 27
A PHP Error was encountered

Severity: Notice

Message: Undefined index: col_id_21_directory

Filename: fieldtypes/Publisher_blocks.php

Line Number: 27
A PHP Error was encountered

Severity: Notice

Message: Undefined index: col_id_2_hidden_file

Filename: fieldtypes/Publisher_blocks.php

Line Number: 27
A PHP Error was encountered

Severity: Notice

Message: Undefined index: col_id_2_hidden_dir

Filename: fieldtypes/Publisher_blocks.php

Line Number: 27
A PHP Error was encountered

Severity: Notice

Message: Undefined index: col_id_2_directory

Filename: fieldtypes/Publisher_blocks.php

Line Number: 27
A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/HopStudios/CornellTech2/cornelltech-v3/sys/codeigniter/system/core/Exceptions.php:170)

Filename: core/EE_Input.php

Line Number: 212
A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/HopStudios/CornellTech2/cornelltech-v3/sys/codeigniter/system/core/Exceptions.php:170)

Filename: libraries/Functions.php

Line Number: 446


It does seem to save the relationship fields though, which is cool. But still, I need that fixed 😊

What can I do to fix that ?

Thanks 😊

#1

BoldMinded (Brian)

I’m sorry to say, but to be honest, to fix it you should remove all the Publisher_ext hooks where the method name starts with “blocks_”. I haven’t officially released the Blocks support and wasn’t planning on doing so because its a pretty large integration and the support would take away time for working on the EE3 version. I only added that support for my company’s site, and apparently forgot to not install the hooks in the last release.

I’ll release an update that won’t install those hooks for other users.

#2

BoldMinded (Brian)

Bryan Burgers hasn’t even released the version of Blocks with my patches to it to make it work with Publisher, so thats why you’re having issues.

#3

BoldMinded (Brian)

I just uploaded 1.7.0 which should remove the Blocks support.

#4

Hop Studios

Hi,

So if Publisher doesn’t support Blocks anymore, does that mean I won’t have issues again ? But Blocks won’t work in draft, is that right ?

Thanks 😊

#5

BoldMinded (Brian)

Well, its never supported Blocks outside of my company’s site, which has a custom build of Blocks itself. The latest build I posted shouldn’t throw any errors, but yes, it won’t work with drafts or translations. You can still save Blocks fields, they’ll just have the same content across all languages and statuses.

I know it doesn’t help you now, but the EE3 version will/should support Blocks (Q Digital would need to add hooks to Blocks).

#6

Hop Studios

Hi,

I’m still having issues with Publisher 1.7.0

A PHP Error was encountered

Severity: Warning

Message: Invalid argument supplied for foreach()

Filename: fieldtypes/Publisher_blocks.php

Line Number: 37 A PHP Error was encountered

Severity: Notice

Message: Undefined index: col_id_21_hidden_file

Filename: fieldtypes/Publisher_blocks.php

Line Number: 30 A PHP Error was encountered

Severity: Notice

Message: Undefined index: col_id_21_hidden_dir

Filename: fieldtypes/Publisher_blocks.php

Line Number: 30 A PHP Error was encountered

Severity: Notice

Message: Undefined index: col_id_21_directory

Filename: fieldtypes/Publisher_blocks.php

Line Number: 30 A PHP Error was encountered

Severity: Notice

Message: Undefined index: col_id_2_hidden_file

Filename: fieldtypes/Publisher_blocks.php

Line Number: 30 A PHP Error was encountered

Severity: Notice

Message: Undefined index: col_id_2_hidden_dir

Filename: fieldtypes/Publisher_blocks.php

Line Number: 30 A PHP Error was encountered

Severity: Notice

Message: Undefined index: col_id_2_directory

Filename: fieldtypes/Publisher_blocks.php

Line Number: 30 A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/HopStudios/CornellTech2/cornelltech-v3/sys/codeigniter/system/core/Exceptions.php:170)

Filename: core/EE_Input.php

Line Number: 212 A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/HopStudios/CornellTech2/cornelltech-v3/sys/codeigniter/system/core/Exceptions.php:170)

Filename: libraries/Functions.php

Line Number: 446

#7

Hop Studios

What I don’t understand is that I get the errors even if I disable Publisher for that specific Block field.

#8

BoldMinded (Brian)

Because the hooks are still getting called. Publisher_blocks.php should not be getting loaded if you’re using the latest build. Open the Publisher_lib.php file and go to line 113. You should see that the file is commented out, thus shouldn’t load.

ln 113: //’Publisher_blocks.php’,

#9

Hop Studios

Yeah, that line is commented out. That’s weird. I even restarted my server to be sure nothing was cached in any way.

#10

Hop Studios

Hi,

The error still appears when I try to add a block row with a File field. If I don’t, everything works fine.

A PHP Error was encountered

Severity: Notice

Message: Undefined index: col_id_21_hidden_file

Filename: fieldtypes/Publisher_blocks.php

Line Number: 30 A PHP Error was encountered

Severity: Notice

Message: Undefined index: col_id_21_hidden_dir

Filename: fieldtypes/Publisher_blocks.php

Line Number: 30 A PHP Error was encountered

Severity: Notice

Message: Undefined index: col_id_21_directory

Filename: fieldtypes/Publisher_blocks.php

Line Number: 30 A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/HopStudios/CornellTech2/cornelltech-v3/sys/codeigniter/system/core/Exceptions.php:170)

Filename: core/EE_Input.php

Line Number: 212 A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/HopStudios/CornellTech2/cornelltech-v3/sys/codeigniter/system/core/Exceptions.php:170)

Filename: libraries/Functions.php

Line Number: 446

#11

Hop Studios

I created an entry before updating Publisher, it still had issues with relationships. I deleted it and created it again, after disabling Publisher for the Blocks field too. All was working fine except for File fields (as mentioned above).

I’ve fixed the code by adding

array_key_exists($columnId, ee()->session->cache[‘atom_definition’]) &&

Line 30 in fieldtypes/Publisher_blocks.php

I know that file is not supposed to be loaded, as you said. But it seems that it is.

#12

BoldMinded (Brian)

Try the build in the next private comment

#13

BoldMinded (Brian)

Comment has been marked private.

#14

Hop Studios

Hi there,

That new version seems to work properly. I encountered another issue (incorrect parameter for foreach, I can’t remember it exactly). I updated Publisher to 1.7.1 and no more error.

I guess we’re all good now, thanks a lot ! I really needed Blocks on that build, and the conflict with Publisher was making me worried for the client. But it’s all good now 😊

Login to reply