? ? Pending

User tests: Successful: Unsuccessful:

avatar brianteeman
brianteeman
10 Mar 2017

the admin module mod_latest displays a list of the most rrecent articles added to the site but it only shows if the article is published or not. It doesnt display if the article is pending or expired.

this PR resolves that and the module will now correctly display if the article is
published, unpublished, pending or expired

Test Instructions

Create 4 articles

  1. Published
  2. Unpublished
  3. Published but Pending (published in the future)
  4. Published but Expired (published but now after the end date)

Before the PR the admin module on the control panel will just display published/unpublished

After the PR the admin module will display the correct icons (the ones you see in the article manager)

Before

screenshotr09-58-43

After

screenshotr10-00-05

avatar brianteeman brianteeman - open - 10 Mar 2017
avatar brianteeman brianteeman - change - 10 Mar 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 10 Mar 2017
Category Modules Administration
avatar brianteeman brianteeman - change - 10 Mar 2017
The description was changed
avatar brianteeman brianteeman - edited - 10 Mar 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 10 Mar 2017

After applied PR got:
bildschirmfoto 2017-03-10 um 11 32 52

avatar brianteeman
brianteeman - comment - 10 Mar 2017

Strange. Clearly I dont see that as I took screenshots with error reporting set to development and i tested on php 56 and 71

avatar infograf768
infograf768 - comment - 10 Mar 2017

The module is not designed to modify the state of the articles in the CPanel. It should just show their state.

avatar infograf768 infograf768 - test_item - 10 Mar 2017 - Tested unsuccessfully
avatar infograf768
infograf768 - comment - 10 Mar 2017

I have tested this item ? unsuccessfully on 2059fe1


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

avatar wilsonge
wilsonge - comment - 10 Mar 2017

I haven't tested but as far as I can tell you are not defining $canChange on the line 19 which would backup @frankmayer 's test. In terms of whether you are allowed to change state - I'm easy. We can just replace $canChange with false if we don't want to allow state change

avatar infograf768
infograf768 - comment - 11 Mar 2017

@brianteeman
@wilsonge suggestions works great.
Just add $canChange = false; after JHtml::_('bootstrap.tooltip');

Example of results:
screen shot 2017-03-11 at 10 17 11

avatar brianteeman
brianteeman - comment - 11 Mar 2017

Updated. I cant test it though as I was never able to get the error for some reason - even though I agree it should have appeared

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 11 Mar 2017 - Tested unsuccessfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 11 Mar 2017

I have tested this item ? unsuccessfully on 2059fe1
Same Error like Comment:
bildschirmfoto 2017-03-11 um 11 14 15


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14446.
avatar joomdonation
joomdonation - comment - 11 Mar 2017

@brianteeman I can see the error, too, both from testing and reading the code as @wilsonge described . Just change the code from:

<?php echo JHtml::_('jgrid.published', $item->state, $i, 'articles.', $canChange, 'cb', $item->publish_up, $item->publish_down); ?>

To:

<?php echo JHtml::_('jgrid.published', $item->state, $i, 'articles.', false, 'cb', $item->publish_up, $item->publish_down); ?>

and it should be OK. Please don't add an unnecessary command $canChange = false;

avatar brianteeman
brianteeman - comment - 11 Mar 2017

I just did what i was told to do :(

On 11 Mar 2017 12:58 p.m., "Tuan Pham Ngoc" notifications@github.com
wrote:

@brianteeman https://github.com/brianteeman I can see the error, too,
both from testing and reading the code as @wilsonge
https://github.com/wilsonge described . Just change the code from:

state, $i, 'articles.', $canChange, 'cb', $item->publish_up, $item->publish_down); ?>

To:

state, $i, 'articles.', false, 'cb', $item->publish_up, $item->publish_down); ?>

and it should be OK. Please don't add an unnecessary command $canChange
= false;


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#14446 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8ePWM4QNFFh40yvHwl3rBp2yrc3zks5rkpqFgaJpZM4MZG8D
.

avatar joomdonation
joomdonation - comment - 11 Mar 2017

Not sure what you did but the code still not updated in this PR

avatar brianteeman brianteeman - change - 11 Mar 2017
Labels Added: ?
avatar brianteeman
brianteeman - comment - 11 Mar 2017

doh - i needed coffee I updated the wrong file. Reverted that and set to false correctly now

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 11 Mar 2017 - Tested successfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 11 Mar 2017

I have tested this item successfully on e804290


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

avatar infograf768 infograf768 - test_item - 11 Mar 2017 - Tested successfully
avatar infograf768
infograf768 - comment - 11 Mar 2017

I have tested this item successfully on e804290


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

avatar infograf768 infograf768 - change - 11 Mar 2017
Status Pending Ready to Commit
avatar infograf768
infograf768 - comment - 11 Mar 2017

rtc


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

avatar wilsonge wilsonge - change - 11 Mar 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-03-11 20:15:23
Closed_By wilsonge
Labels Added: ?
avatar wilsonge wilsonge - close - 11 Mar 2017
avatar wilsonge wilsonge - merge - 11 Mar 2017
avatar wilsonge
wilsonge - comment - 11 Mar 2017

Good stuff :)

Add a Comment

Login with GitHub to post a comment