Skip to content
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

Merged
merged 4 commits into from
Jun 14, 2017
Merged

[4.0] Fix articles modules #16608

merged 4 commits into from
Jun 14, 2017

Conversation

joomdonation
Copy link
Contributor

Pull Request for Issue # .

Summary of Changes

Similar to #16607, this PR fixes the remaining modules:

  • mod_articles_category
  • mod_articles_news
  • mod_articles_popular

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

@ghost
Copy link

ghost commented Jun 10, 2017

I have tested this item 🔴 unsuccessfully on 63d2a98

index.php/news-flash give 404.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/16608.

@joomdonation
Copy link
Contributor Author

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');
Copy link
Member

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?

Copy link
Contributor Author

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');
Copy link
Member

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');
Copy link
Member

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');
Copy link
Member

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?

@joomdonation
Copy link
Contributor Author

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

@ghost
Copy link

ghost commented Jun 10, 2017

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.

@joomdonation
Copy link
Contributor Author

@wilsonge Shouldn't this one be merged? Or you want to have helper file namespaced as Allon mentioned?

@wilsonge wilsonge merged commit afa4756 into joomla:4.0-dev Jun 14, 2017
@wilsonge wilsonge added this to the Joomla 4.0 milestone Jun 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants