?
avatar wilsonge
wilsonge
24 Oct 2016

Steps to reproduce the issue

Create an article and have it unpublished and starting at a date in the future. You get two warnings:
screen shot 2016-10-24 at 22 40 55

Expected result

1 warning

Actual result

2 warnings

System information (as much as possible)

Joomla release teasing :P 3.6.3

Additional comments

This is not worth my time probably filing a bug report :D

Votes

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

avatar wilsonge wilsonge - open - 24 Oct 2016
avatar brianteeman brianteeman - change - 24 Oct 2016
Status New Confirmed
avatar brianteeman
brianteeman - comment - 24 Oct 2016

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.

avatar jeckodevelopment
jeckodevelopment - comment - 24 Oct 2016

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.

avatar infograf768
infograf768 - comment - 25 Oct 2016

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?

avatar zero-24 zero-24 - change - 25 Oct 2016
Labels Added: ?
avatar brianteeman
brianteeman - comment - 25 Oct 2016

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/

avatar andrepereiradasilva
andrepereiradasilva - comment - 25 Oct 2016

i agree with @infograf768 @brianteeman i don't see this as a bug.

avatar wilsonge wilsonge - change - 25 Oct 2016
Status Confirmed Closed
Closed_Date 0000-00-00 00:00:00 2016-10-25 18:26:37
Closed_By wilsonge
avatar wilsonge wilsonge - close - 25 Oct 2016
avatar wilsonge wilsonge - close - 25 Oct 2016
avatar brianteeman
brianteeman - comment - 25 Oct 2016

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 yet

Therefore 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/

avatar uzielweb
uzielweb - comment - 1 Nov 2016

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 comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12540.

avatar wilsonge
wilsonge - comment - 1 Nov 2016

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

avatar uzielweb
uzielweb - comment - 1 Nov 2016

Well... I am investigating Joomla Art Problem wth this.. my template is JA Teline IV


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

avatar brianteeman
brianteeman - comment - 1 Nov 2016

Switch to protostar. Do you have the problem. If not then it's your badly coded template

avatar uzielweb
uzielweb - comment - 1 Nov 2016

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...


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

avatar uzielweb
uzielweb - comment - 1 Nov 2016

[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.


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

Add a Comment

Login with GitHub to post a comment