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: Bloqs Update Error

Status Resolved
Add-on / Version Bloqs 4.5.1
Severity
EE Version 5.4

Werner Gusset

Feb 05, 2021

Website with Publisher and Bloqs. Updated Bloqs from 4.2.3 to 4.5.1. Publisher is on your latest 3.2.3.

Wenn I open an ENtry that has Bloqs I get this error messages:

Warning
call_user_func_array() expects parameter 1 to be a valid callback, class ‘Publisher_ext’ does not have a method ‘blocks_before_display_field’
ee/legacy/libraries/Extensions.php, line 222

Severity: E_WARNING

Fatal error: Uncaught TypeError: Return value of BoldMinded\Bloqs\Controller\HookExecutor::beforeDisplayField() must be of the type array, null returned in /home/xxxxxxx/system/user/addons/bloqs/Controller/HookExecutor.php:172 Stack trace: #0 /home/xxxxxx/system/user/addons/bloqs/ft.bloqs.php(241): BoldMinded\Bloqs\Controller\HookExecutor->beforeDisplayField(‘1’, 10, NULL) #1 /home/xxxxxx/system/ee/legacy/fieldtypes/EE_Fieldtype.php(326): Bloqs_ft->display_field(’ ‘) #2 /home/xxxxxx/system/ee/legacy/libraries/api/Api_channel_fields.php(410): EE_Fieldtype->display_publish_field(’ ‘) #3 /home/xxxxxx/system/ee/EllisLab/ExpressionEngine/Model/Content/FieldFacade.php(219): Api_channel_fields->apply(‘display_publish…’, Array) #4 /home/xxxxxx/system/ee/EllisLab/ExpressionEngine/Model/Content/Display/FieldDisplay.php(70): EllisLab\ExpressionEngine\Model\Content\FieldFacade->getForm() #5 /home/xxxxxx/system/ee/EllisLab/ExpressionEngine/View/publish/partials/publish_form.php(84): EllisLab\ExpressionEngine\Model\Conte in /home/xxxxxx/system/user/addons/bloqs/Controller/HookExecutor.php on line 172

Can I do something?

#1

BoldMinded (Brian)

Comment has been marked private.

#2

Werner Gusset

Thanks. Installed the build. Meanwhile our projects runs on 3 servers since we started developing it (why that is, is a different story). they are copies which I do update since we have had the PHP 7.4 trouble (older ticket). On one install the error is gone. On the two other servers for testing and there the error is still there. That is strange and I double-checked. I cannot spot any difference in software versions on this two.

#3

Werner Gusset

Sorry, I reuploaded all files to the server on the two installs that resulted in errors and then cleared the cache. Now there are no more errors. It seems I am now one step further. Thank you.

#4

Werner Gusset

Unfortunately I am not much further:

This error happens when I want to save an entry.

Bloqs Save Error

An error has occurred while saving this entry. Please ask your site administrator to check the developer logs.

The reason I updated bloqs, was this message. I then updated what resulted in this ticket.

I copy the log info in private message

#5

Werner Gusset

Comment has been marked private.

#6

BoldMinded (Brian)

Werner, does that happen every time you save and on every environment? Based on the error message I don’t see how that is happening. It’s doing a successful string replacement in one part of the query, but other another part of the same query. The error is suggesting that this first replacement is failing, but based on the code you have, there is no reason it should be failing (these have been unchanged for quite some time now, so it’s very odd that this is happening).

$queryString = str_replace(', `data`)', ', data, publisher_lang_id, publisher_status)', $queryString);
$queryString = str_replace(', :data)', ', :data, :langId, :status)', $queryString);
#7

Werner Gusset

Brian, it happens on all 3 installs I have.

Do I need to do something with the code from your message?

#8

BoldMinded (Brian)

Comment has been marked private.

#9

Werner Gusset

This version gives errors when opening a one entry channel (entry has bloqs) a - it gives the error when opening a multiple entries channel with bloqs entries.

Warning call_user_func_array() expects parameter 1 to be a valid callback, class ‘Publisher_ext’ does not have a method ‘blocks_before_display_field’ ee/legacy/libraries/Extensions.php, line 222

Severity: E_WARNING

Fatal error: Uncaught TypeError: Return value of BoldMinded\Bloqs\Controller\HookExecutor::beforeDisplayField() must be of the type array, null returned in /home/octave2d/system/user/addons/bloqs/Controller/HookExecutor.php:172 Stack trace: #0 /home/octave2d/system/user/addons/bloqs/ft.bloqs.php(241): BoldMinded\Bloqs\Controller\HookExecutor->beforeDisplayField(‘1’, 10, NULL) #1 /home/octave2d/system/ee/legacy/fieldtypes/EE_Fieldtype.php(326): Bloqs_ft->display_field(’ ‘) #2 /home/octave2d/system/ee/legacy/libraries/api/Api_channel_fields.php(410): EE_Fieldtype->display_publish_field(’ ‘) #3 /home/octave2d/system/ee/EllisLab/ExpressionEngine/Model/Content/FieldFacade.php(219): Api_channel_fields->apply(‘display_publish…’, Array) #4 /home/octave2d/system/ee/EllisLab/ExpressionEngine/Model/Content/Display/FieldDisplay.php(70): EllisLab\ExpressionEngine\Model\Content\FieldFacade->getForm() #5 /home/octave2d/system/ee/EllisLab/ExpressionEngine/View/publish/partials/publish_form.php(84): EllisLab\ExpressionEngine\Model\Conte in /home/octave2d/system/user/addons/bloqs/Controller/HookExecutor.php on line 172

#10

BoldMinded (Brian)

Since you got a pre-release version of Publisher there was something out of sync. You’ll need to run the following query in your environment, then update the Publisher files that will be in the next comment, and click the run updates again. Basically you’re going to set your Publisher version back to 3.2.3, then run the 3.2.4 updates again.

update exp_modules set module_version = '3.2.3' where module_name = 'Publisher';
#11

BoldMinded (Brian)

Comment has been marked private.

#12

Werner Gusset

I have executed the query, uploaded the new files and clicked the update button in the add-ons list for Publisher. The error is still the same.

#13

BoldMinded (Brian)

Which error? This one? There’s no way if the Publisher updates were executed.

call_user_func_array() expects parameter 1 to be a valid callback, class ‘Publisher_ext’ does not have a method ‘blocks_before_display_field’ ee/legacy/libraries/Extensions.php, line 222

#14

Werner Gusset

Yes, Brian that one.

The Add-on list says Publisher 3.2.4

#15

BoldMinded (Brian)

Can you run the following queries. They are what are supposed to run when the update executes.

delete from exp_extensions where hook = 'blocks_before_display_field';
ALTER TABLE `exp_blocks_block` DROP COLUMN `to_delete` ;
ALTER TABLE `exp_blocks_atom` DROP COLUMN `to_delete` ;
#16

Werner Gusset

Ok, now it lets me save an entry with Bloqs and there is no error. Problem solved.

I would like to have the other installs in the same state. Will there be a version that could do this or do I need to repeat all steps from here? What would you suggest?

#17

BoldMinded (Brian)

You’ll probably have to repeat those queries in other environments as you got a build that wasn’t public that I had to reverse a code change on (hence the queries to delete things).

#18

Werner Gusset

OK, got it.Here it’s time to finish the day. Thanks for the help.

#19

BoldMinded (Brian)

Glad it’s working now, sorry about the confusion 😊

Login to reply