? Success

User tests: Successful: Unsuccessful:

avatar andrepereiradasilva
andrepereiradasilva
5 Apr 2016

Summary of Changes

If you have a category blog layout or feature layout in the frontpage you will notice when editing the edit article URI is not the same as the article URI.

Sometimes those articles are in other menu items (in categories blog/list menu items for instance) and should be edited on that pages, not on the frontend page.

This can cause strange things, for instead, if you have a module (a slider, for instance) on top of the frontpage, the edit page will have that module too! Example:
image

This PR intends to correct that by making the edit article URI the same as the article URI (+ the edit url parameters).

Testing Instructions

Prepare test
  1. Use 3.5.0 or latest staging and use protostar template
  2. Create a category "test-category"
  3. Create an article "test-article-1" inside the category "test-category" and feature it
  4. Create a home menu item (feature items type) listing the "test-category", called "test-home-menu"
  5. Create a normal menu item (article type) pointing to "test-article-1", called "test-article-menu"

By now you will have a test scenario like this:
image

Do the test
  1. Go to frontend and authenticate so you're in edit mode.
  2. On the frontpage feature items click the "test-article-1" link (notice the URI), go back and then click the "test-article-1" edit link (notice the URI). You can see:
    • the article link points to your "test-article-menu"
    • the edit link points to your "test-home-menu" (with edit layout)
  3. Apply this patch.
  4. Repeat step 2. You can see:
    • the article link points to your "test-article-menu"
    • the edit link points to your "test-article-menu" (with edit layout)
  5. Finally test other article edit links to check they are working fine.
avatar andrepereiradasilva andrepereiradasilva - open - 5 Apr 2016
avatar andrepereiradasilva andrepereiradasilva - change - 5 Apr 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 5 Apr 2016
Labels Added: ?
avatar brianteeman brianteeman - change - 5 Apr 2016
Category Components
avatar brianteeman brianteeman - change - 5 Apr 2016
Category Components Components Router / SEF
avatar shubhamnba2009
shubhamnba2009 - comment - 5 Apr 2016

Hi andrepereiradasilva,
Under your "Do the test" instruction in point 2nd, after clicking "test-article-1" link the edit option is available on that page after clicking, I think there is no point in going back as per your instruction.

And after that i followed:
1. test-article-1 link: http://localhost/stagingtest/index.php/test-article-menu
2. clicking on test-article-1 edit link: http://localhost/stagingtest/index.php/test-article-menu?view=form&layout=edit&a_id=6&return=aHR0cDovL2xvY2FsaG9zdC9zdGFnaW5ndGVzdC9pbmRleC5waHAvdGVzdC1hcnRpY2xlLW1lbnU=

Without applying patch they show test-article-menu.

Tell me if i have missed something, so that i can test again.


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

avatar andrepereiradasilva
andrepereiradasilva - comment - 5 Apr 2016

Before patch did you check the links on the frontpage as image above?

  • Article link: http://yourhostname/test-article-menu
  • Article edit link: http://yourhostname/?task=article.edit&a_id=5&return=<hash>

image

Under your "Do the test" instruction in point 2nd, after clicking "test-article-1" link the edit option is available on that page after clicking, I think there is no point in going back as per your instruction.

That's exactly the point of this PR! The frontpage edit icons URI are different that the article page edit icons URI.

avatar shubhamnba2009
shubhamnba2009 - comment - 5 Apr 2016

Yeah i checked before applying PR.
1. test-article-1 link: http://localhost/stagingtest/index.php/test-article-menu

  1. clicking on test-article-1 edit link: http://localhost/stagingtest/index.php/test-article-menu?view=form&layout=edit&a_id=6&return=aHR0cDovL2xvY2FsaG9zdC9zdGFnaW5ndGVzdC9pbmRleC5waHAvdGVzdC1hcnRpY2xlLW1lbnU=

These are the results.


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

avatar andrepereiradasilva
andrepereiradasilva - comment - 5 Apr 2016

but did you click on "Edit" exactly when you're on the frontpage like the picture shows? Not inside the article page, that one is already fine without the PR.

avatar shubhamnba2009
shubhamnba2009 - comment - 5 Apr 2016

This is how it looks on myside!!

This is my screenshot


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

avatar shubhamnba2009
shubhamnba2009 - comment - 5 Apr 2016

I probably went to test-article-menu from homepage.Thats why it's not showing


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

avatar andrepereiradasilva
andrepereiradasilva - comment - 5 Apr 2016

you are not on the homepage ...
Look at the breadcrumb:

  • mine "You are here: Home"
  • yours: "You are here: Home > test-article-menu"

You must be on "Home"

test-home-menu should be the site default (home) page also

avatar shubhamnba2009
shubhamnba2009 - comment - 5 Apr 2016

Yeah ,Mistake on my side.
Now it shows correctly after applying the patch and before applying it.


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

avatar shubhamnba2009 shubhamnba2009 - test_item - 5 Apr 2016 - Tested successfully
avatar shubhamnba2009
shubhamnba2009 - comment - 5 Apr 2016

I have tested this item :white_check_mark: successfully on ea27c49


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

avatar andrepereiradasilva
andrepereiradasilva - comment - 5 Apr 2016

thanks for testing

avatar designbengel designbengel - test_item - 8 Apr 2016 - Tested unsuccessfully
avatar designbengel
designbengel - comment - 8 Apr 2016

I have tested this item :red_circle: unsuccessfully on ea27c49

... when clicking from home i have also the test-article-menu instead of the home item?


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

avatar andrepereiradasilva
andrepereiradasilva - comment - 8 Apr 2016

@designbengel
i don't understand what you mean. please be more specific.

If you're talking about the article edit link in featured articles in homepage, that's exactly the point of this PR, if you edit an article you should enter the edit layout in the article view not in the home page view.

avatar infograf768
infograf768 - comment - 9 Apr 2016

Not sure this patch is necessary as it is not recorded by search engines. But it works fine.

While testing I remarked something which is weird:
When saving/canceling the edited article from the article view (not from the home featured page) the redirect url includes ?hitcount=0
I.e
domain.com/test-article-menu.html?hitcount=0

avatar infograf768 infograf768 - test_item - 9 Apr 2016 - Tested successfully
avatar infograf768
infograf768 - comment - 9 Apr 2016

I have tested this item :white_check_mark: successfully on ea27c49


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

avatar designbengel
designbengel - comment - 9 Apr 2016

tested again and:
before applying the patch i have: index.php?view=form&layout=edit&a_id=77&return=xyz
after applying the patch i have: test-article-menu-99?view=form&layout=edit&a_id=77&return=xyz on home-item and on home-item-article

when there is no article menu item:
clicking on "All Front End Views" > "Featured Articles"
/index.php/featured-articles -> on edit the first article: index.php/article-category-list?view=form&layout=edit&a_id=24&catid=19&return=a

  • when creating a single article menu item for this article it works like described.

is this right?


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

avatar andrepereiradasilva
andrepereiradasilva - comment - 9 Apr 2016

@designbengel.

There are 3 scenarios:

  • If you DON'T HAVE a published menu item for the article and DON'T HAVE a published menu item for the article parent category: ContentHelperRoute::getArticleRoute will generate a custom URI for the article inside the category (ex: /8-category-en-gb/1-article-en-gb?task=article.edit&...), but when you click on it the edit mode is rendered in the frontpage.

  • If you DON'T HAVE a published menu item for the article and HAVE a published menu item for the article parent category: ContentHelperRoute::getArticleRoute will generate a custom URI for the article inside the category (ex: /category-menu-item/1-article-en-gb?task=article.edit&...), and when you click on it the edit mode is rendered in article view.

  • If you HAVE a published menu item for the article: ContentHelperRoute::getArticleRoute will generate a custom URI for the article (ex: /article-menu-item?task=article.edit&...), and when you click on it the edit mode is rendered in article view.

The second scenario seems to be your case.

But the point is, in any of the scenarios, when you mouseover the article URI and the "Edit" URI, the URI are exactly the same after this PR (excluding the edit URI parameters of course.)

So yes, IMO your test is a success.

avatar andrepereiradasilva
andrepereiradasilva - comment - 14 Apr 2016

@designbengel if it's a success test please mark it as success. thanks

avatar designbengel designbengel - test_item - 15 Apr 2016 - Tested successfully
avatar designbengel
designbengel - comment - 15 Apr 2016

I have tested this item :white_check_mark: successfully on ea27c49


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

avatar brianteeman brianteeman - change - 15 Apr 2016
Status Pending Ready to Commit
avatar brianteeman
brianteeman - comment - 15 Apr 2016

RTC - maintainer please decide if this is a new feature or a bug fix


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

avatar joomla-cms-bot joomla-cms-bot - change - 15 Apr 2016
Labels Added: ?
avatar andrepereiradasilva
andrepereiradasilva - comment - 15 Apr 2016
avatar rdeutz
rdeutz - comment - 15 Apr 2016

for me it sounds more like a bug fix then a feature

avatar brianteeman brianteeman - change - 15 Apr 2016
Milestone Added:
avatar brianteeman
brianteeman - comment - 15 Apr 2016

ok 3.5.2 then

On 15 April 2016 at 13:11, Robert Deutz notifications@github.com wrote:

for me it sounds more like a bug fix then a feature


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#9740 (comment)

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar rdeutz rdeutz - reference | 73f9d51 - 15 Apr 16
avatar rdeutz rdeutz - merge - 15 Apr 2016
avatar rdeutz rdeutz - close - 15 Apr 2016
avatar rdeutz rdeutz - change - 15 Apr 2016
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-04-15 12:18:53
Closed_By rdeutz
avatar rdeutz rdeutz - close - 15 Apr 2016
avatar rdeutz rdeutz - merge - 15 Apr 2016
avatar joomla-cms-bot joomla-cms-bot - close - 15 Apr 2016
avatar joomla-cms-bot joomla-cms-bot - change - 15 Apr 2016
Labels Removed: ?
avatar andrepereiradasilva andrepereiradasilva - head_ref_deleted - 15 Apr 2016
avatar rdeutz rdeutz - change - 1 May 2016
Milestone Removed:
avatar rdeutz rdeutz - change - 1 May 2016
Milestone Added:
avatar rdeutz rdeutz - change - 1 May 2016
Milestone Added:
avatar rdeutz rdeutz - change - 1 May 2016
Milestone Removed:

Add a Comment

Login with GitHub to post a comment