Error message using image block in composer - Concrete5.7

Permalink
Hi,
I am creating a project section for my client which uses composer. Fundamentally it works similarly to a blog. I am using several image blocks within the composer form but when creating a new project page it can randomly throw up the following error message when assigning images to the composer image blocks:

{"error":{"message":"Unsupported operand types"},"errors":["Unsupported operand types"]}

See attached image...

This corrupts the project page which I then have to delete.

I just can't figure out what is triggering it. Any help or suggestions would be great.

1 Attachment

studio108
View Replies:
MrKDilkington replied on at Permalink Reply
MrKDilkington
Hi studio108,

What version of concrete5 are you using?

To try and recreate your issue, please include screenshots of your Page Type form (including individual form controls) and Composer page.
studio108 replied on at Permalink Reply 6 Attachments
studio108
Hi,
I am using 5.7.5.3. I have attached some screen grabs.
Perhaps the composer doesn't like multiple image blocks?

I did it so that the client didn't have to add blocks manually but if the problem keeps occurring then I may need to go that route.
MrKDilkington replied on at Permalink Reply
MrKDilkington
@studio108

I can confirm part of the issue.

- I setup a page type with the form controls from your screenshot and made a large number of pages.
- I did not receive the error consistently, but each time was always after selecting an image.
{"error":{"type":"Whoops\\Exception\\ErrorException","message":"Unsupported operand types","file":"C:\\xampp\\htdocs\\concrete5\\concrete\\blocks\\image\\controller.php","line":181,"trace":[{"file":"C:\\xampp\\htdocs\\concrete5\\concrete\\blocks\\image\\controller.php","line":181,"function":null,"class":null,"args":[]}]},"errors":["Unsupported operand types"]}

Where things differ is that I could close the error modal and continue. While you said it corrupted the page and it had to be deleted.

Also, if you receive the error after selecting an image, close the error modal, publish, then reopen Composer, the Image block with the error will not load. Instead of the Image block a message will be shown in its place.
Unable to load block into composer. You must edit this content from within the context of the page.
studio108 replied on at Permalink Reply
studio108
Hi Mr Dilkington,

Happy Christmas

I can confirm your findings too. Does this get posted as a bug?
MrKDilkington replied on at Permalink Reply
MrKDilkington
@studio108

I am going to get another person to confirm then make a GitHub issue for it.
studio108 replied on at Permalink Reply
studio108
Hi,

I am just about to hand the website over to my client and this error is still occurring. Any work around that you could suggest?

I see it is up on Github marked as a bug.
MrKDilkington replied on at Permalink Reply
MrKDilkington
@studio108

I am not aware of a workaround. In the meantime, I recommend you and others experiencing this problem comment on the issue. This will raise attention to it.

"Error when using Image blocks in Composer #3251"
https://github.com/concrete5/concrete5/issues/3251...
Gondwana replied on at Permalink Reply
Gondwana
I'm getting this on 5.7.5.9. I commented on github.
Jozzeh replied on at Permalink Reply
Jozzeh
Have this issue as well on the newest version of C5 (5.7.5.6) ... Well, at least the same error message.

I only get the error when first selecting the public date and then selecting an image.
So in my case, the workaround is first selecting the image(s) and then selecting the public date.