Hi, I updated my Joomla website from 6.04. to 6.1 and suddenly the publishing start date and publishing end date are no longer available during creation of an article on the front-end.
I used two see two tabs, but now I see three tabs and on teh last tab named Publishing, I only see the fields Created by Alias and Metadata (fields Meta Description and Keywords).
In the Article options I have switched on the Publishing options on the Editing layout tab.
How do i get back the publishing start and end date in the front-end during Article creation?
| Labels |
Removed:
?
|
||
| Labels |
Added:
No Code Attached Yet
|
||
| Labels |
Added:
bug
|
||
I would have written a pr but there must have been a reason for that if block and as I couldnt see what it was I didnt want to step in
I looked into the PR #45081, and it seems the if (!is_null($this->item->id)) check was added to fix layout issues with the start featured and finish featured fields, but the side effect is that it hides the start publishing and finish publishing dates when creating a new article.
quick fix would be to remove that main if block and only apply the check to the featured fields instead.
@chmst, if you think this won't break the workflow layout you originally planned, I will submit a PR for it
For my sites a made a quick override/fix by commenting out / disable both the if and endif php statements
For my sites a made a quick override/fix by commenting out / disable both the if and endif php statements
and the endif on line 133
I would have written a pr but there must have been a reason for that if block and as I couldnt see what it was I didnt want to step in
@brianteeman The right fix would be changed the if (!is_null($this->item->id)) which you pointed out to if ($this->item->params->get('access-change')) . The logic is these fields should only be shown if the logged in user has edit state permission.
if you dont have that access already how can you even create an article? and why was it only restricted to new articles
if you dont have that access already how can you even create an article
I'm unsure if I mis-understand your question. Edit State does not control whether you can create article, it only control whether you are allowed to change state related fields (Status, featured, publish up, publish down....)
and why was it only restricted to new articles
It is restricted to both new and existing article.
you need to look at the code and how it is displayed then. What you are saying makes no sense with the reality
you need to look at the code and how it is displayed then. What you are saying makes no sense with the reality
I did look at the code. I will try to make PR later today.
Hi, I would like to work on this issue.
From the discussion, it seems the problem is caused by the condition:
if (!is_null($this->item->id)) which hides publishing fields for new articles.
I am planning to replace it with a permission-based check like:
$this->item->params->get('access-change') so that fields are shown based on user permissions instead of article state.
Please let me know if this approach is correct before I submit a PR.
| Status | New | ⇒ | Closed |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2026-04-21 10:01:54 |
| Closed_By | ⇒ | alikon |
As this is for the frontend it might be that your site template has an override in place. Can you temporarily switch to the cassiopeia template to see if the problem still exists there. That will really help to establish the problem