No Code Attached Yet Information Required
avatar maggus
maggus
31 Oct 2024

Steps to reproduce the issue

  • Build a native, simple Joomla! 5 component with name com_component_name
  • Use a toolbar button in backend: New, Edit, Close, Cancel, whatever...

Expected result

  • User should probably be redirected to a com_component_name view

Actual result

  • User will be redirected to a com_componentname view that does not exist

System information (as much as possible)

  • Joomla 5.2.0
  • PHP 8.2.12

Additional comments

Hi there! I am not sure if this is a bug. I have migrated a component whose former name was of type com_component_name. As you can see there is a second underscore in the component's name. Thus, the component does not meet Joomla's naming convention for components. However, this was working fine for a Joomla 3 component. But now, on Joomla 5, there is a redirect to com_componentname views when hitting any toolbar button in the component's backend.

Is this intended by design or is this a possible bug in the routing system?

Thank you for your feedback!

avatar maggus maggus - open - 31 Oct 2024
avatar joomla-cms-bot joomla-cms-bot - change - 31 Oct 2024
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 31 Oct 2024
avatar HLeithner
HLeithner - comment - 1 Nov 2024

Good question, the option parameter is filtered normally with the CMD filter which actually allows _, have you tracked down where the redirect is happening? is the parameter in the form right?

avatar maggus
maggus - comment - 1 Nov 2024

Hi @HLeithner!

Thank you for your answer!

If you ask for the outputted form parameters, they seem to be correct:
<form action="/orthos/administrator/index.php?option=com_orthos_doctors&amp;layout=edit&amp;id=783" method="post" name="adminForm" id="adminForm" class="form-validate">

And this is the response header after submitting:

HTTP/1.1 303 See other
Date: Fri, 01 Nov 2024 16:03:08 GMT
Server: Apache/2.4.58 (Win64) OpenSSL/3.1.3 PHP/8.2.12
Referrer-Policy: unsafe-url
X-Powered-By: PHP/8.2.12
Location: http://localhost/orthos/administrator/index.php?option=com_orthosdoctors&view=doctors
Expires: Wed, 17 Aug 2005 00:00:00 GMT
Last-Modified: Fri, 01 Nov 2024 16:03:09 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Length: 0
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=utf-8

Not sure, if this is helpful.

However, when renaming the component from com_component_name to com_componentname, all redirects are correct and existing.

avatar HLeithner
HLeithner - comment - 3 Nov 2024

I will bring this to the next Maintainers meeting in 2 weeks, I'm not 100% sure if it's a bug we want to solve since, as you said, it doesn't full fill the naming convention.

avatar HLeithner
HLeithner - comment - 6 Nov 2024

ok, we discussed this in the maintainer meeting and would like to support _ in component name, but we can't replicate your issue.

so maybe you can provide a simple component where this issue happens?

avatar MacJoom
MacJoom - comment - 7 Nov 2024

I have a component with an underscore in the name and the Toolbar works fine. We need your code to check.

avatar Quy Quy - change - 7 Nov 2024
Labels Added: Information Required
avatar Quy Quy - labeled - 7 Nov 2024

Add a Comment

Login with GitHub to post a comment