? Success

User tests: Successful: Unsuccessful:

avatar bertmert
bertmert
29 Apr 2015

@houbahoubi described the issue here
#6287 (comment)
and referenced
http://forum.joomla.org/viewtopic.php?f=706&t=884342#p3296536

Test instructions:

  • Go to Content > Article Manager > Article Manager Options > Tabulator Articles.
  • Set Show Unauthorised Links to YES > Save and Close.

  • Create a category and add 1, 2, 3 articles WITH READ MORE marker in editor text.

  • Go to Extensions > Module Manager

  • Create new module of type Articles - Newsflash (On all pages, Position, Published).
  • Select category.
  • Settings:
    newsflash

  • See frontend

newsflash2

  • Go to backend and set Acces of one or more of these articles to Registered.

  • See frontend

newsflash3

  • Click Register to Read More > Login.
  • Landing page (return page) is profile editing page instead of article view.

  • Logout!!

  • Apply patch.

  • Click Register to Read More > Login.

  • Landing page (return page) is article view now.
avatar bertmert bertmert - open - 29 Apr 2015
avatar bertmert
bertmert - comment - 29 Apr 2015

Could someone please have a look at Travis error. I don't understand:

Fatal error: require(): Cannot redeclare class phpdocumentor\reflection\docblock\tag\seetag in /home/travis/.phpenv/versions/5.4.40/bin/phpunit on line 188
avatar zero-24
zero-24 - comment - 30 Apr 2015

@bertmert it looks like a global travis issue. as we have a similiar here: https://travis-ci.org/joomla/joomla-cms/jobs/60622434

avatar zero-24 zero-24 - change - 30 Apr 2015
Status New Pending
avatar zero-24 zero-24 - change - 30 Apr 2015
Category Front End Modules
avatar houbahoubi
houbahoubi - comment - 30 Apr 2015

Hello

Thanks a lot for your help! So I works fine for me, with the modified code for the helper.php file I am now redirected to the article !

But just a little think again I am redirected to the article but on the default homepage menu not in the real place of my article so in the good menu.

After login the link is : ..../index.php?option=com_content&view=article&id=11:actualite-3-avec-acces-securise&catid=11&Itemid=138
Or the real place of the article is : .../index.php?option=com_content&view=article&id=11:actualite-3-avec-acces-securise&catid=11&Itemid=138
As you see it's just the & instead of & that cause the problem ? Have you an idea ?
Thanks

avatar bertmert
bertmert - comment - 1 May 2015

@houbahoubi Thanks for testing.
I made my tests with SEF enabled in Joomla. I was redirected to the correct menu.

Because I don't understand: Could you please surround the URLs in your comment with three backticks like this.

backticks

to get output like this

&blah=blubb&blahh=blabb
avatar bertmert
bertmert - comment - 1 May 2015

@houbahoubi Please test again.

Yes, you're right but I don't understand why this happens.

index.php?option=com_content&view=article&id=8:beginners&catid=19&Itemid=260

redirects correctly. But not

index.php?option=com_content&view=article&id=8:beginners&catid=19&Itemid=260

Maybe somebody can help us why we need this additional line that I've added now to the patch when SEF is disabled::

$returnURL = str_replace('&', '&', $returnURL);
avatar houbahoubi
houbahoubi - comment - 1 May 2015

Hello

@bertmert Many thanks for your quick help

Yes exactly untill now I test my website in non-sef mode. I test with sef mode I have not the problem exactly like you.
I have modified the code with your updated code, and now it works fine for me with non-sef mode too.

avatar zero-24
zero-24 - comment - 1 May 2015

@test successful after the patch we are redirected to the right article. Thanks @bertmert

avatar zero-24 zero-24 - alter_testresult - 1 May 2015 - houbahoubi: Tested successfully
avatar zero-24 zero-24 - test_item - 1 May 2015 - Tested successfully
avatar zero-24 zero-24 - test_item - 1 May 2015 - Tested successfully
avatar houbahoubi
houbahoubi - comment - 1 May 2015

@all Thanks for your help! Is this update will be on a next joomla update ?

avatar bertmert
bertmert - comment - 1 May 2015

@zero-24 Comment added.

avatar zero-24 zero-24 - change - 1 May 2015
Status Pending Ready to Commit
avatar zero-24
zero-24 - comment - 1 May 2015

Thanks so i'm RTC'ing here :smile:


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

avatar zero-24 zero-24 - change - 1 May 2015
Labels Added: ?
avatar infograf768
infograf768 - comment - 21 May 2015

Hmm, it looks likes the & issue is not only existing here —when sef off— but in every layout using this.
Blog, featured, single article.

avatar Kubik-Rubik
Kubik-Rubik - comment - 21 May 2015

@bertmert To avoid the mentioned problem, you have to set the second argument in JRoute::_ to false. Could you please update your PR to:

$item->link = new JUri(JRoute::_('index.php?option=com_users&view=login', false));
$item->link->setVar('return', base64_encode(JRoute::_(ContentHelperRoute::getArticleRoute($item->slug, $item->catid, $item->language), false)));
$item->linkText = JText::_('MOD_ARTICLES_NEWS_READMORE_REGISTER');

(This is the complete else-statement.)

Thank you in advance! After you've updated the PR, I will merge it.

avatar infograf768
infograf768 - comment - 21 May 2015

I guess we should also do that in the other layouts I mentioned above.

avatar Kubik-Rubik
Kubik-Rubik - comment - 21 May 2015

@infograf768 Yes, we should do it there too.

avatar Kubik-Rubik Kubik-Rubik - change - 21 May 2015
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 21 May 2015
Labels Added: ?
avatar Kubik-Rubik Kubik-Rubik - change - 21 May 2015
Status Ready to Commit Needs Review
avatar Kubik-Rubik Kubik-Rubik - change - 21 May 2015
Status Needs Review Pending
avatar zero-24 zero-24 - change - 21 May 2015
Labels Removed: ?
avatar bertmert
bertmert - comment - 21 May 2015

@Kubik-Rubik
Code changed (#6864 (comment)) and tested, SEF and non-SEF

avatar Kubik-Rubik Kubik-Rubik - change - 22 May 2015
Labels Added: ?
avatar Kubik-Rubik Kubik-Rubik - change - 22 May 2015
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2015-05-22 10:41:21
Closed_By Kubik-Rubik
avatar Kubik-Rubik Kubik-Rubik - close - 22 May 2015
avatar zero-24 zero-24 - close - 22 May 2015
avatar Kubik-Rubik
Kubik-Rubik - comment - 22 May 2015

Merged. Thank you @bertmert!

avatar infograf768
infograf768 - comment - 23 May 2015

@bertmert
Can you correct also the other layouts to use false ?

avatar bertmert
bertmert - comment - 23 May 2015

@infograf768
Yes, I can.

avatar infograf768
infograf768 - comment - 23 May 2015

Thanks, please do not forget beez3. ;)

avatar zero-24 zero-24 - change - 14 Oct 2015
Labels Removed: ?

Add a Comment

Login with GitHub to post a comment