Feature Language Change PR-6.0-dev PR-6.1-dev Pending

User tests: Successful: Unsuccessful:

avatar drmenzelit
drmenzelit
27 Aug 2025

Pull Request for Issue # .

Summary of Changes

The PR add a new parameter in mod_articles to show also unpublished articles (only if you are logged in in the frontend and your user has the necessary rights).

Still draft, because there are maybe other options like start publishing date that are not taken in account. Adding a "unpublished" badge would be necessary. Badges already added.

Testing Instructions

Create articles, some published, some unpublished, some published in the future, some already expired.
Create an articles module, there is a new field "Show unpublished articles" you can set to yes (but only if no archived articles are selected).
Test different combinations of options (filtering, grouping, etc.). Use different users in different user groups to create articles. Check what you see in frontend logged in as different users.

Actual result BEFORE applying this Pull Request

Expected result AFTER applying this Pull Request

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
2.00

avatar drmenzelit drmenzelit - open - 27 Aug 2025
avatar drmenzelit drmenzelit - change - 27 Aug 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 27 Aug 2025
Category Language & Strings Modules Front End
avatar drmenzelit drmenzelit - change - 27 Aug 2025
Labels Added: Language Change PR-5.4-dev
avatar drmenzelit drmenzelit - change - 27 Aug 2025
The description was changed
avatar drmenzelit drmenzelit - edited - 27 Aug 2025
avatar drmenzelit drmenzelit - change - 27 Aug 2025
Title
Add the possibility to show unpublished articles in mod_articles
Add the possibility to show unpublished / archived articles from current user in mod_articles
avatar drmenzelit drmenzelit - edited - 27 Aug 2025
avatar drmenzelit drmenzelit - change - 27 Aug 2025
Labels Added: Feature
avatar drmenzelit drmenzelit - change - 27 Aug 2025
Title
Add the possibility to show unpublished / archived articles from current user in mod_articles
Add the possibility to show unpublished articles from current user in mod_articles
avatar drmenzelit drmenzelit - edited - 27 Aug 2025
avatar drmenzelit drmenzelit - change - 27 Aug 2025
The description was changed
avatar drmenzelit drmenzelit - edited - 27 Aug 2025
avatar drmenzelit
drmenzelit - comment - 28 Aug 2025

Ok, I new try (after a talk with Sigrid): the option for unpublished articles is now available outside the author's filter

avatar drmenzelit drmenzelit - change - 28 Aug 2025
The description was changed
avatar drmenzelit drmenzelit - edited - 28 Aug 2025
avatar drmenzelit drmenzelit - change - 28 Aug 2025
Title
Add the possibility to show unpublished articles from current user in mod_articles
Add the possibility to show unpublished articles in mod_articles
avatar drmenzelit drmenzelit - edited - 28 Aug 2025
avatar webgras
webgras - comment - 28 Aug 2025

As my code comments are not visible right now, here is it again:
I did some testing and for the usability it really seems not consistent to have the field only for "own articles". However, then you would have a module for specific user(s) to show also their unpublished/not yet published articles.
This could help for workflow features.
So, I would also make it possible for specific author(s).

But Viviana added that already.

avatar webgras webgras - test_item - 28 Aug 2025 - Tested successfully
avatar webgras
webgras - comment - 28 Aug 2025

I have tested this item ✅ successfully on 59922e3


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

avatar joomla-cms-bot joomla-cms-bot - change - 28 Aug 2025
Category Language & Strings Modules Front End Administration com_menus Front End com_contact com_content com_newsfeeds Installation Language & Strings Layout Libraries Modules NPM Change
avatar brianteeman
brianteeman - comment - 28 Aug 2025

There seem to be a lot of unrelated changes here?

avatar drmenzelit
drmenzelit - comment - 28 Aug 2025

Still on draft, because there are unrelated changes in my branch ... I'm an upmerge ahead ...

avatar drmenzelit drmenzelit - change - 28 Aug 2025
Labels Added: NPM Resource Changed PR-6.0-dev
Removed: PR-5.4-dev
avatar joomla-cms-bot joomla-cms-bot - change - 28 Aug 2025
Category Language & Strings Modules Front End Administration com_menus com_contact com_content com_newsfeeds Installation Layout Libraries NPM Change Language & Strings Modules Front End
avatar drmenzelit drmenzelit - change - 28 Aug 2025
Title
Add the possibility to show unpublished articles in mod_articles
[6.1] Add the possibility to show unpublished articles in mod_articles
avatar drmenzelit drmenzelit - edited - 28 Aug 2025
avatar brianteeman
brianteeman - comment - 28 Aug 2025

Just to be clear when testing. When you say "show unpublished" then this means it will include unpublished, expired and not yet published?

avatar drmenzelit
drmenzelit - comment - 28 Aug 2025

it will include unpublished, expired and not yet published

Exactly. I added some lines in the description above and a screenshot of my test module

avatar ChristineWk
ChristineWk - comment - 28 Aug 2025

I tried it yesterday. Today it (actually) worked too.
There's a difference: it now shows: "hidden."
See screenshot if it works.

zwei-beitraege-versteckt
avatar brianteeman
brianteeman - comment - 29 Aug 2025

I am NOT logged in but the module is showing me unpublished. not published yet etc articles

image
avatar drmenzelit
drmenzelit - comment - 29 Aug 2025

@brianteeman thanks for checking. On my test yesterday I didn't see that, but on a new installation I can confirm your finding.
I'm afraid, I'm lost ... I thought the ArticlesModel delivers the articles depending on the access/edit rights ...

avatar drmenzelit drmenzelit - change - 29 Aug 2025
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2025-08-29 15:06:58
Closed_By drmenzelit
Labels Removed: NPM Resource Changed
avatar drmenzelit drmenzelit - close - 29 Aug 2025
avatar drmenzelit drmenzelit - change - 29 Aug 2025
Status Closed New
Closed_Date 2025-08-29 15:06:58
Closed_By drmenzelit
avatar drmenzelit drmenzelit - change - 29 Aug 2025
Status New Pending
avatar drmenzelit drmenzelit - reopen - 29 Aug 2025
avatar drmenzelit drmenzelit - change - 30 Aug 2025
The description was changed
avatar drmenzelit drmenzelit - edited - 30 Aug 2025
avatar HLeithner
HLeithner - comment - 31 Aug 2025

This pull request has been automatically rebased to 6.1-dev.

avatar Fedik
Fedik - comment - 1 Sep 2025

@drmenzelit The module Articles bypasses populateState of the ArticlesModel because of ['ignore_request' => true], and so it does not do any extra filtering on its own

In the module you need to do something like done in there:

$user = $this->getCurrentUser();
if ((!$user->authorise('core.edit.state', 'com_content')) && (!$user->authorise('core.edit', 'com_content'))) {
// Filter on published for those who do not have edit or edit.state rights.
$this->setState('filter.published', ContentComponent::CONDITION_PUBLISHED);
}

avatar drmenzelit drmenzelit - change - 1 Sep 2025
Labels Added: PR-6.1-dev
avatar drmenzelit drmenzelit - change - 1 Sep 2025
The description was changed
avatar drmenzelit drmenzelit - edited - 1 Sep 2025
avatar ChristineWk
ChristineWk - comment - 1 Sep 2025

Seems OK?
stand-01sep jpg

avatar brianteeman
brianteeman - comment - 5 Sep 2025

The issue I reported earlier is now resolved

avatar brianteeman
brianteeman - comment - 5 Sep 2025

As an author. Am I expected to be able to see my own articles in the module if they are unpublished/expired/notpublished yet

avatar drmenzelit
drmenzelit - comment - 5 Sep 2025

As an author. Am I expected to be able to see my own articles in the module if they are unpublished/expired/notpublished yet

You can, if you have edit rights

avatar brianteeman
brianteeman - comment - 5 Sep 2025

As a test I set the module option Author Filtering TypeI to Only from current user

I expected that as (in my test) the user is an author and they have edit own rights that I would be able to see articles I have created and are expired/notpublished yet - I can not

Maybe my expectation is incorrect

avatar Fedik
Fedik - comment - 5 Sep 2025

I expected that as (in my test) the user is an author and they have edit own rights that I would be able to see articles I have created and are expired/notpublished yet - I can not

From code view it is already should be like that.
When ContentComponent::CONDITION_UNPUBLISHED is present then the date filter is ignored.

// Filter by start and end dates.
if (
!(is_numeric($condition) && $condition == ContentComponent::CONDITION_UNPUBLISHED)
&& !(\is_array($condition) && \in_array(ContentComponent::CONDITION_UNPUBLISHED, $condition))
) {
$query->where(
[
'(' . $db->quoteName('a.publish_up') . ' IS NULL OR ' . $db->quoteName('a.publish_up') . ' <= :publishUp)',
'(' . $db->quoteName('a.publish_down') . ' IS NULL OR ' . $db->quoteName('a.publish_down') . ' >= :publishDown)',
]
)
->bind(':publishUp', $nowDate)
->bind(':publishDown', $nowDate);
}

Maybe something mixed up, but I do not see what.

avatar drmenzelit
drmenzelit - comment - 5 Sep 2025

edit own rights are not enough

Add a Comment

Login with GitHub to post a comment