-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[4.0] Fix articles modules #16608
[4.0] Fix articles modules #16608
Conversation
I have tested this item 🔴 unsuccessfully on 63d2a98 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/16608. |
It is actually not related to this PR. It causes by Content - Page Break plugin https://github.com/joomla/joomla-cms/blob/4.0-dev/plugins/content/pagebreak/pagebreak.php#L81 I haven't read the code of that plugin yet, so we can leave it to next PR |
@@ -12,6 +12,8 @@ | |||
// Include the helper functions only once | |||
JLoader::register('ModArticlesCategoryHelper', __DIR__ . '/helper.php'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this also be namespaced?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I can namespace it. But I need to have final confirm from @wilsonge about whether we want to namespace this helper class. The reason is because recently, the autoload psr4 was merged but only or components
I don't know how he wants to handle namespace for module or if namespace for modules is needed. So lets leave it for the next PR. This PR mostly to fix fatal error in some modules here because it is using old code for calling none-existent model classes
@@ -12,7 +12,9 @@ | |||
// Include the latest functions only once | |||
JLoader::register('ModArticlesLatestHelper', __DIR__ . '/helper.php'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this also be namespaced?
@@ -12,7 +12,9 @@ | |||
// Include the news functions only once | |||
JLoader::register('ModArticlesNewsHelper', __DIR__ . '/helper.php'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this also be namespaced?
@@ -12,7 +12,9 @@ | |||
// Include the popular functions only once | |||
JLoader::register('ModArticlesPopularHelper', __DIR__ . '/helper.php'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this also be namespaced?
OK. So I checked and found that the issue happens with Joomla 3.x as well, so look like a bug from this module I checked article view, and see that the fourth parameter of onContentPrepare trigger has null as default value. So I changed the parameter value from 1 to 0 on this commit 2005578. @wilsonge Please check it to confirm the change is correct. @franz-wohlkoenig Please test it again |
I have tested this item ✅ successfully on 2005578 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/16608. |
@wilsonge Shouldn't this one be merged? Or you want to have helper file namespaced as Allon mentioned? |
Pull Request for Issue # .
Summary of Changes
Similar to #16607, this PR fixes the remaining modules:
It including calling the namespaced class from com_content + use the namespaced class instead some aliases class
Testing Instructions
Code review. Maybe @wilsonge can review and merge it