1

Craft Pro 3.0.7
Notifications Plugin 1.0.6
PHP 7.0

In trying to send notifications for new entries that have a checkbox field, we get this error in the logs:

2018-05-14 09:19:32 [192.168.10.1][1][-][error][UnexpectedValueException] UnexpectedValueException: Error at offset 0 of 2 bytes in /home/path/to/vendor/yiisoft/yii2-queue/src/serializers/PhpSerializer.php:32

This manifests as the notification getting stuck in queue, never releasing, always showing progress bar.

Removing only the checkbox field from this section, the notifications work as expected without any errors.

From what I read, serialization errors may result from encoding problems.

What else can I try to resolve this? Where else can I look?

  • It might be a good idea to show us your code – Robin Schambach May 14 '18 at 20:20
  • What code? I have written no code. An error is getting thrown using Craft and Notifications right out of the box. – Steve Mock May 14 '18 at 20:25
  • There is no default queue that sends notifications for new entries out of the box – Robin Schambach May 14 '18 at 20:29
  • I know. That's what this plug in is for. Ostensibly. github.com/Rias500/craft-notifications – Steve Mock May 14 '18 at 20:32
  • But this plugin won't magically send notifications either. You need to make certain configurations... Ostensibly. Anyway. Without further information the ability to help is really limited. I would suggest you to contact the creator of the plugin directly. – Robin Schambach May 14 '18 at 20:38
1

Update the Notifications plugin.

From Craft Support:

Ultimately Yii/Craft is using PHP's serialize() method to do the serialization, which has always had quirks with serializing different types of objects, especially the more complex those objects are.

We try to only serialize simple objects and primitive data structures (arrays, strings, bools, etc.) to try and minimize those issues as much as possible.

From The Developer:

Notifications are no longer queued as this causes a lot of issues with serialization. Will find a better solution for this in the future.

Prior to version 1.1.0, the Notifications plugin was attempted to serialize the entire entry to place it in queue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.