Implemented error after updating to Joomla 4

More
2 years 2 months ago - 2 years 2 months ago #1929 by Matej Bórik
error after updating to Joomla 4 was created by Matej Bórik
Hello, after switching to Joomla 4, I have a problem displaying the page if the Content plugin - ochOpenGraph is enabled.

When enabled then the error is: TOO FEW ARGUMENTS TO FUNCTION OCHOPENGRAPHHELPER::{CLOSURE}(), 4 PASSED AND EXACTLY 5 EXPECTED
If the plugin is disabled, then the page is displayed correctly.

I've noticed that there are already more arguments in the URL field when uploading images to articles there will probably be a problem somewhere.
Url in Joomla editor is for example looking like this: images/priestory/priestory.jpg#joomlaImage://local-images/priestory/priestory.jpg?width=899&height=450

The old way it was just like that and the site worked ok: images/priestory/priestory.jpg

How to solve it? Thank you,

DOWNLOADLINK TEST VERSION:
This message contains confidential information
Last edit: 2 years 2 months ago by Ruud van Lent. Reason: Added download link
The topic has been locked.
More
2 years 2 months ago #1930 by Ruud van Lent
Replied by Ruud van Lent on topic error after updating to Joomla 4
Hi, thanks for your report.
Do you have an url to the page where you are having the issue?
What kind of page is it?
Is it a joomla.article? Are you using a custom module to trigger the plugin?
The topic has been locked.
More
2 years 2 months ago #1931 by Matej Bórik
Replied by Matej Bórik on topic error after updating to Joomla 4
Yes, Joomla 4.0.6, PHP 8.0.13, with och plugin enabled:

www.projektmetro.sk/coworking
  • image url in editor: images/priestory/priestory.jpg#joomlaImage://local-images/priestory/priestory.jpg?width=899&height=450
  • this is the updated Joomla article
www.projektmetro.sk/partneri
  • image url in editor: images/priestory/mia1.jpg
  • I haven't updated this article with new image, if so, it will do the same error
It looks like the page will crash when a new image is uploaded and the URL gets new parameters
The topic has been locked.
More
2 years 2 months ago #1932 by Ruud van Lent
Replied by Ruud van Lent on topic error after updating to Joomla 4
Thanks for the info,
Will try to reproduce tomorrow on my development site.
The topic has been locked.
More
2 years 2 months ago #1935 by Matej Bórik
Replied by Matej Bórik on topic error after updating to Joomla 4
I tried to switch it to PHP 7.4.26 and that's fine there.

So the bug is caused by something else in that plugin in PHP 8.0.13.
The topic has been locked.
More
2 years 2 months ago #1936 by Ruud van Lent
Replied by Ruud van Lent on topic error after updating to Joomla 4
Thanks Matej,
Good info: that will help solving this.
The topic has been locked.
More
2 years 2 months ago #1937 by Ruud van Lent
Replied by Ruud van Lent on topic error after updating to Joomla 4
Good morning Matej,

not able to reproduce te issue on my own sites (running php version 8.0 and 8.1).
Also when I insert an image it doesn't have the url parameters '#joomlaImage....'

Also on the callstack for the error on your site, it is listing linenumbers in my code that are not correct: the functions called are not on those line numbers?

Nevertheless, I have an updated version for you to test, you can download it. the download link is in the first post (yours) in this topic.

Curious if this fixes the issue :)
The following user(s) said Thank You: Matej Bórik
The topic has been locked.
More
2 years 2 months ago #1939 by Matej Bórik
Replied by Matej Bórik on topic error after updating to Joomla 4
Perfect, it works, everything is ok 
The topic has been locked.
More
2 years 2 months ago #1940 by Ruud van Lent
Replied by Ruud van Lent on topic error after updating to Joomla 4
Cool, good it is working.
will be part of next release, that version will update the test version without problem when released.

thanks for reporting this!
have a good weekend,
Ruud.
The topic has been locked.