? ? Pending

User tests: Successful: Unsuccessful:

avatar richard67
richard67
21 Oct 2019

Pull Request for Issue #26783 , see also #26751 (comment) .

Summary of Changes

Changes the code to produce the edit icon for frontend editing so it handles real null values for published up and down times.

This fixes the issue that on current 4.0-dev, they eye icon is shown for published articles instead of the edit icon, like it would be with unpublished or not published yet articles.

Testing Instructions

Use an installation of current 4.0-dev or latest nightly build of today.

  1. Create an article with state = published and show it on frontend.
  2. On frontend, login as used who has permission for frontend editing.
  3. Click the edit button (gear icon at the right top corner of article).
  4. In the pulldown which appears below the gear icon, check the icon shown for the "Edit" menu item.

Result: See section "Actual result" below.

  1. Apply patch.
  2. Reload the page on frontend.
  3. Check again the icon in the frontend editing pulldown menu.

Result: See section "Expected result" below.

  1. Play around with publish up and down times so you have following situations, and check the icon again:
  • Published down in past = article expired
  • Published up in future = article pending (i.e. not published yet)
  • Published up in past, published down in future = article published
  • If you want play with other combinations with empty or not empty published up or down fields.

Expected result

For published articles the edit icon is shown and for unpublished, pending or expired articles the eye icon.

snap-14

Actual result

For published articles the same eye icon is shown as for unpublished, expired or pending articles.

snap-13

Documentation Changes Required

None.

avatar richard67 richard67 - open - 21 Oct 2019
avatar richard67 richard67 - change - 21 Oct 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 21 Oct 2019
Category Layout
avatar richard67
richard67 - comment - 21 Oct 2019

@wilsonge Do we need to check old nulldates here for 3rd party compatibility? Is not a library, but can the layout used by 3rd party? As far as I can it is only made for articles, and those are created by core, so we don't need to check old nulldates, right? Or shall we better stay safe and keep the old nulldates like it is now in this PR?

avatar richard67 richard67 - change - 21 Oct 2019
The description was changed
avatar richard67 richard67 - edited - 21 Oct 2019
avatar richard67 richard67 - change - 21 Oct 2019
Title
[4.0] [WiP] Null date corrections for frontent edit icon
[4.0] Null date corrections for frontent edit icon
avatar richard67 richard67 - edited - 21 Oct 2019
avatar Stuartemk
Stuartemk - comment - 21 Oct 2019

In pull 26751 @ infograf768 it says: Null Date is now defined by null and no more by Factory :: getDbo () -> getNullDate ()

Now in this pull it is used again ... Am I missing something or is there something I don't understand?

Or the problem is that there is no established parameter of code ?, as it still happens with the array limes () and that they should be replaced by [] but still use them in the development of Joomla 4.x ... as as many deprecated that are still written.

Thank you.

avatar richard67
richard67 - comment - 21 Oct 2019

@Stuartemk We want to keep the old nulldates in addition to real nulls only where it might be necessary for 3rd party extensions. Here I am not sure if to keep it or not, that's why I've pinged wilsonge before for his opinion.

avatar infograf768
infograf768 - comment - 22 Oct 2019

@richard67

Or shall we better stay safe and keep the old nulldates like it is now in this PR?

That layout can be used by a 3rd party. Let's keep the old nulldates.

avatar infograf768 infograf768 - change - 22 Oct 2019
Labels Added: ?
avatar infograf768
infograf768 - comment - 22 Oct 2019

I get with this patch depending on the state of the article:

Screen Shot 2019-10-22 at 07 23 11

and

Screen Shot 2019-10-22 at 07 22 30

Is that OK? (Except evidently for the display of the tips)

avatar richard67
richard67 - comment - 22 Oct 2019

@infograf768 Yes, that’s how it shall be (except the bad tips of course).

avatar infograf768 infograf768 - test_item - 22 Oct 2019 - Tested successfully
avatar infograf768
infograf768 - comment - 22 Oct 2019

I have tested this item successfully on 28202f9


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

avatar alikon alikon - test_item - 22 Oct 2019 - Tested successfully
avatar alikon
alikon - comment - 22 Oct 2019

I have tested this item successfully on 28202f9


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

avatar alikon alikon - change - 22 Oct 2019
Status Pending Ready to Commit
avatar alikon
alikon - comment - 22 Oct 2019

RTC


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

avatar SharkyKZ
SharkyKZ - comment - 22 Oct 2019

Or shall we better stay safe and keep the old nulldates like it is now in this PR?

No. This layout is specific to com_content.

avatar richard67
richard67 - comment - 23 Oct 2019

George confirmed in Glip that I shall keep the old nulldates, too, because this layout might be used by 3rd partries, too, and I think if not then it doesn't hurt. Naming of variables and so on look to me as if it was made for articles only, but this might be for historic reasons because frontend editing at the very first beginning was limited to articles only, if I remeber right. So all ok here.

2a1026b 23 Oct 2019 avatar richard67 PHPCS
avatar richard67 richard67 - change - 23 Oct 2019
Labels Added: ?
avatar richard67
richard67 - comment - 23 Oct 2019

@Quy Done.

avatar richard67
richard67 - comment - 23 Oct 2019

@Quy When I check drone failure (which seems not to be caused by this PR) I see some red banner at the bottom of the drone page telling about some license to be exceeded.

avatar Quy
Quy - comment - 23 Oct 2019

Maybe @wilsonge or @Hackwar knows about the Drone's license issue.

avatar richard67 richard67 - change - 23 Oct 2019
The description was changed
avatar richard67 richard67 - edited - 23 Oct 2019
avatar wilsonge wilsonge - close - 25 Oct 2019
avatar wilsonge wilsonge - merge - 25 Oct 2019
avatar wilsonge wilsonge - change - 25 Oct 2019
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2019-10-25 20:47:57
Closed_By wilsonge
avatar wilsonge
wilsonge - comment - 25 Oct 2019

Thanks!

avatar richard67
richard67 - comment - 25 Oct 2019

Thanks too all testers and mergers ?

Add a Comment

Login with GitHub to post a comment