No Code Attached Yet bug
avatar drmenzelit
drmenzelit
17 May 2022

Steps to reproduce the issue

Install blog sample data in a Joomla 4.2 instance
Check a category blog menu item
Play with the parameters for articles ordering, try to change the classes for items, etc.

Expected result

The menu item "Blog" is configured to display 4 leading articles with classes "boxed" and "columns-2"
grafik

In the frontend you should have a two columns layout with boxes

If you change the articles ordering in the menu item, you should see changes in the ordering of the articles in frontend

Actual result

No columns, no boxes, no changes in ordering. The parameters from menu item are being ignored, only the global options are used.

System information (as much as possible)

PHP Built On Windows NT DESKTOP-H2FDIEA 10.0 build 19044 (Windows 10) AMD64
Database Type mysql
Database Version 10.4.22-MariaDB
Database Collation utf8mb4_unicode_ci
Database Connection Collation utf8mb4_general_ci
Database Connection Encryption None
Database Server Supports Connection Encryption No
PHP Version 8.0.14
Web Server Apache/2.4.52 (Win64) OpenSSL/1.1.1m PHP/8.0.14
WebServer to PHP Interface apache2handler
Joomla! Version Joomla! 4.2.0-alpha3-dev Development [ Uaminifu ] 26-April-2022 16:49 GMT
User Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0

Additional comments

avatar drmenzelit drmenzelit - open - 17 May 2022
avatar joomla-cms-bot joomla-cms-bot - change - 17 May 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 17 May 2022
avatar chmst
chmst - comment - 17 May 2022

Confirmed.

https://github.com/joomla/joomla-cms/blob/4.1-dev/components/com_content/src/Model/CategoryModel.php#L145
The $app->getMenu()->getActive() gives the active menu item in 4.1.
In 4.2 the result is empty.

avatar chmst chmst - change - 17 May 2022
Labels Added: bug
avatar chmst chmst - labeled - 17 May 2022
avatar chmst chmst - change - 17 May 2022
Labels Added: Release Blocker
avatar chmst chmst - labeled - 17 May 2022
avatar drmenzelit drmenzelit - change - 17 May 2022
The description was changed
avatar drmenzelit drmenzelit - edited - 17 May 2022
avatar joomdonation
joomdonation - comment - 17 May 2022

It causes by PR #37630. For 4.2-dev, calls $app->getMenu() always return a new menu object https://github.com/joomla/joomla-cms/blob/4.2-dev/libraries/src/Application/CMSApplication.php#L533 , so active menu item set for menu (for example, during routing process) could not be get by calling $app->getMenu()->getActive() (always return null)

So somehow, we will have to cache menu instance per app like how we did in the past. @laoneo Could you please look at this ?

avatar ChristineWk
ChristineWk - comment - 17 May 2022

Issue confirmed. Have the same settings as on the screenshot.
But I can only see 1 column.

System infos:

Linux www45.world4you.com 4.18.0-305.10.2.2.lve.el8.x86_64 #1 SMP Wed Jul 28 12:08:46 EDT 2021 x86_64 
Database Type 
mysql 
Database Version 
5.7.36-log 
Database Collation 
latin1_swedish_ci 
Database Connection Collation 
utf8mb4_general_ci 
Database Connection Encryption 
None 
Database Server Supports Connection Encryption 
Yes 
PHP Version 
7.4.28 
Web Server 
Apache 
WebServer to PHP Interface 
cgi-fcgi 
Joomla! Version 
Joomla! 4.2.0-alpha3-dev Development [ Uaminifu ] 26-April-2022 16:49 GMT 
User Agent 
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0 ```

 <hr /><sub>This comment was created with the <a href="https://github.com/joomla/jissues">J!Tracker Application</a> at <a href="https://issues.joomla.org/tracker/joomla-cms/37822">issues.joomla.org/tracker/joomla-cms/37822</a>.</sub>
avatar laoneo
laoneo - comment - 17 May 2022

@joomdonation is right. But why we do need to cache the menu to make it work? Not saying we should not cache, but do we do set some params on runtime and not on create? Just wondering where the caching should be done as for me it looks like something along the line is wrong and revealed with the pr #37630.

avatar laoneo
laoneo - comment - 18 May 2022

Please test #37824.

avatar alikon alikon - change - 18 May 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-05-18 08:39:20
Closed_By alikon
avatar alikon alikon - close - 18 May 2022
avatar alikon
alikon - comment - 18 May 2022

closing as we have a pr #37824

avatar richard67 richard67 - change - 16 Jun 2022
Labels Removed: Release Blocker
avatar richard67 richard67 - unlabeled - 16 Jun 2022

Add a Comment

Login with GitHub to post a comment