Create an article and have it unpublished and starting at a date in the future. You get two warnings:
1 warning
2 warnings
Joomla release teasing :P 3.6.3
This is not worth my time probably filing a bug report :D
Status | New | ⇒ | Confirmed |
If we want to reduce to just one "label" we should have a difference from what is "Unpublished" and what is "Not published yet". In this last case in fact the article will be published automatically, so the status is just temporary.
If the publication date is set to the future and the article is published, we do not get the Unpublished
button but only the Not Published yet
Therefore I do not see this as a bug. It informs the admin of the full status of an article.
Similar code is (in 3 files)
<?php if ($this->item->state == 0) : ?>
<span class="label label-warning"><?php echo JText::_('JUNPUBLISHED'); ?></span>
<?php endif; ?>
<?php if (strtotime($this->item->publish_up) > strtotime(JFactory::getDate())) : ?>
<span class="label label-warning"><?php echo JText::_('JNOTPUBLISHEDYET'); ?></span>
<?php endif; ?>
If we want to display only one button, giving the priority to Not published yet
and to Expired
, we would need I guess something like:
<?php if ($this->item->state == 0) : ?>
<?php if (strtotime($this->item->publish_up) > strtotime(JFactory::getDate())) : ?>
<span class="label label-warning"><?php echo JText::_('JNOTPUBLISHEDYET'); ?></span>
<?php elseif ((strtotime($this->item->publish_down) < strtotime(JFactory::getDate())) && $this->item->publish_down != JFactory::getDbo()->getNullDate()) : ?>
<span class="label label-warning"><?php echo JText::_('JEXPIRED'); ?></span>
<?php else : ?>
<span class="label label-warning"><?php echo JText::_('JUNPUBLISHED'); ?></span>
<?php endif; ?>
<?php elseif (strtotime($this->item->publish_up) > strtotime(JFactory::getDate())) : ?>
<span class="label label-warning"><?php echo JText::_('JNOTPUBLISHEDYET'); ?></span>
<?php elseif ((strtotime($this->item->publish_down) < strtotime(JFactory::getDate())) && $this->item->publish_down != JFactory::getDbo()->getNullDate()) : ?>
<span class="label label-warning"><?php echo JText::_('JEXPIRED'); ?></span>
<?php endif; ?>
Is it really worth?
Labels |
Added:
?
|
I dont see a bug here. it is intended and correct behaviour
On 24 October 2016 at 23:56, Luca Marzo notifications@github.com wrote:
If we want to reduce to just one "label" we should have a difference from
what is "Unpublished" and what is "Not published yet". In this last case in
fact the article will be published automatically, so the status is just
temporary.—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#12540 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8bJAIVlkiVSC6fa3Visr63C86JBFks5q3TeBgaJpZM4KfW2w
.
Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
https://brian.teeman.net/ http://brian.teeman.net/
i agree with @infograf768 @brianteeman i don't see this as a bug.
Status | Confirmed | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-10-25 18:26:37 |
Closed_By | ⇒ | wilsonge |
Not a bug for me
On 25 October 2016 at 10:18, infograf768 notifications@github.com wrote:
If the publication date is set to the future and the article is published,
we do not get the Unpublished button but only the Not Published yetTherefore I do not see this as a bug. It informs the admin of full the
status of an article.Similar code is (in 3 files)
<?php if ($this->item->state == 0) : ?> <span class="label label-warning"><?php echo JText::_('JUNPUBLISHED'); ?></span> <?php endif; ?> <?php if (strtotime($this->item->publish_up) > strtotime(JFactory::getDate())) : ?> <span class="label label-warning"><?php echo JText::_('JNOTPUBLISHEDYET'); ?></span> <?php endif; ?>
If we want to display only one button, giving the priority to Not
published yet and to Expired, we would need I guess something like:<?php if ($this->item->state == 0) : ?> <?php if (strtotime($this->item->publish_up) > strtotime(JFactory::getDate())) : ?> <span class="label label-warning"><?php echo JText::_('JNOTPUBLISHEDYET'); ?></span> <?php elseif ((strtotime($this->item->publish_down) < strtotime(JFactory::getDate())) && $this->item->publish_down != JFactory::getDbo()->getNullDate()) : ?> <span class="label label-warning"><?php echo JText::_('JEXPIRED'); ?></span> <?php else : ?> <span class="label label-warning"><?php echo JText::_('JUNPUBLISHED'); ?></span> <?php endif; ?> <?php elseif (strtotime($this->item->publish_up) > strtotime(JFactory::getDate())) : ?> <span class="label label-warning"><?php echo JText::_('JNOTPUBLISHEDYET'); ?></span> <?php elseif ((strtotime($this->item->publish_down) < strtotime(JFactory::getDate())) && $this->item->publish_down != JFactory::getDbo()->getNullDate()) : ?> <span class="label label-warning"><?php echo JText::_('JEXPIRED'); ?></span> <?php endif; ?>
Is it really worth?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#12540 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8dGo5x5d-G9Lz6CRbrgLtxMJpptQks5q3clbgaJpZM4KfW2w
.
Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
https://brian.teeman.net/ http://brian.teeman.net/
This is a bug:
when set to published and the date is future, the article still appearing for anyone an as published with a warning button.
The correct is: when published and date is future the article needs to be set as unpublished and do not showing for public (without any button or only for admin users)....
Yes, the actual code have "bad rules"
Please, update this bad code.
This doesn't show for the public with the unpublished tag. Only for those in a publisher or above user group. If that has broken then this needs to be opened as a separate issue
Well... I am investigating Joomla Art Problem wth this.. my template is JA Teline IV
Switch to protostar. Do you have the problem. If not then it's your badly coded template
The Website many groups and acess levels... and a lot of plugins... Thanks for now... I will test to reproduce this issue withth a clean website... and I will open another issue... sorry for report my case in this issue...
[solved] With a clean website, my problem do not occurs. [solved]
Sorry for my bad report... and I will rebuild this crazy website from a clean and blank template.
That's all for now.
Thank you, guys.
I can confirm this but i think it is correct to display both these messages
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12540.