No Code Attached Yet bug
avatar niosme
niosme
21 Mar 2024

Steps to reproduce the issue

Site is multilingual with two languages. Greek and English.
Created a field and attached to an article.
When i go to edit the articles from the menu which shows a single article with a custom field attached the popup throws this error

Invalid controller: name='article', format=''

Expected result

Popup should open the article to be editted.

Actual result

Popup with a message Invalid controller: name='article', format=''
Screenshot 2024-03-21 at 9 26 53 AM
Screenshot 2024-03-21 at 9 27 01 AM

System information (as much as possible)

Joomla 4.4.3
Php 8.2
Broswer: Firefox 123.0.1

Additional comments

avatar niosme niosme - open - 21 Mar 2024
avatar joomla-cms-bot joomla-cms-bot - change - 21 Mar 2024
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 21 Mar 2024
avatar niosme niosme - change - 21 Mar 2024
The description was changed
avatar niosme niosme - edited - 21 Mar 2024
avatar Quy
Quy - comment - 21 Mar 2024

Unable to replicate.
Maybe a conflict with a non-core extension.
Enable Debug System and Error Reporting to Maximum to get a trace stack.

avatar Quy Quy - change - 23 Mar 2024
Labels Added: Information Required
avatar Quy Quy - labeled - 23 Mar 2024
avatar Hackwar Hackwar - change - 24 Mar 2024
Labels Added: bug
avatar Hackwar Hackwar - labeled - 24 Mar 2024
avatar niosme
niosme - comment - 26 Mar 2024

There are no extensions installed in this installation.

Debug throws the same error without any stacktrace. The only things shows up before the edit article popup at the menu edit page is that
PHP Deprecated: Creation of dynamic property Joomla\Database\Mysql\MysqlDriver::$charset is deprecated in /home/user/public_html/libraries/vendor/joomla/database/src/Mysql/MysqlDriver.php on line 121
by i dont think is something that have to do with that situation.

avatar brianteeman
brianteeman - comment - 26 Mar 2024

unable to replicate

avatar chmst
chmst - comment - 26 Mar 2024

Which type of field is it? I am using core joomla fields and cannot replicate the error.

avatar niosme
niosme - comment - 28 Mar 2024

Its two calendar fields and one integer field. Its also a mutlilingual site with two languages.

I figured out that is happening even on single articles. I tested a same installation on the same server and everyting works. I am posting the two .har files from the working site and from the site with the problem on popup.

Download har files : har-files.zip

The popup throws a 500 error.
The only error i see is that the 500 error thrown on this url
https://domain.gr/en/administrator/index.php?option=com_content&view=article&layout=modal&tmpl=component&80ba69656519f9851b5e42fbeab96476=1&task=article.edit&id=' 3 '

Which leaves the id untrimmed with quotes. On the other site this is trimmed without the quotes.

On the working site har you can jump to the requests on time
07:13:28.574 303
07:13:29.034 200 OK

And on the non working site har you can see the latest
07:12:15.721 302
07:12:16.226 500 ERROR

if you check the both 07:13:29.034 200 OK and 07:12:16.226 500 ERROR request you will see the difference.
Dont know why this is happening on a same installation on the same server.

You can analyze the .har files from here
https://toolbox.googleapps.com/apps/har_analyzer/

avatar Quy Quy - change - 31 Mar 2024
Labels Removed: Information Required
avatar Quy Quy - unlabeled - 31 Mar 2024
avatar Fedik
Fedik - comment - 31 Mar 2024

The quotes not an issue, $input->getInt("' 3 '") will clean it up, and return 3.

From you har files I can see that something interrupt &task=article.edit request, because the response still contain id=' 3 ' however it cannot hapen in core.
In core the ID is cleaned here

$recordId = (int) (\count($cid) ? $cid[0] : $this->input->getInt($urlVar));

then goes redirect to &view=article&id=3.

But, even if you do manualy &view=article&id=' 3 ' it still will work, in core (because ID is filtered).
A reason of your issue is somewhere else.

I do not realy see how the error on your screenshot can hapen in core, unles there something is modified.

If you do not have any extensions installed, then you probably need to check you server config, if there any extra URL filtering or something.

avatar Fedik
Fedik - comment - 31 Mar 2024

BTW, The error message Invalid controller: name='article', format='' means that the

throw new \InvalidArgumentException(Text::sprintf('JLIB_APPLICATION_ERROR_INVALID_CONTROLLER', $type, $format));
cannot find the controller.

However this code not used by Joomla 4 Content component. Joomla 4 uses ComponentDispatcher.

So, I think there is realy something wrong with your installation.

avatar brianteeman
brianteeman - comment - 31 Mar 2024

a har file will not help debug the problem. Server logs and a stack trace are the only way to truly see what is going on. The fact that you cannot get a stack trace to display is a concern.

avatar niosme
niosme - comment - 2 Apr 2024

Its the popup which doesnt throw the stack trace and no error occured.If i disable the seo it redirects to the homepage instead of throwing this.
By the way its a copy of a working installation on the exact same server under a same hosting package.

I reinstalled joomla core files but nothing fixed.

I dont know what is happening. Its surely something with the installation but i just copied from a working installation and changed the configuration to make it work. You can close the issue and if i figure out what is happening i ll let you know. :)

avatar Quy Quy - close - 2 Apr 2024
avatar Quy Quy - change - 2 Apr 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-04-02 14:35:21
Closed_By Quy
avatar Quy
Quy - comment - 2 Apr 2024

Closing. Hopefully, you will be able to figure it out and let us know. Thanks.

Add a Comment

Login with GitHub to post a comment