YOOtheme Pro is here! The best WordPress and Joomla theme. Learn more

Avatar simon.mara.76 asked

Read more return parameter removed by Warp 7

I'm looking to build a new publication site using the Monday template, but the Read More button at the bottom of the intro to a restricted article doesn't include the return parameter so after logging in, the user is left on the User profile screen and not taken back to the article they wish to read.

Monday theme:
https://staging.pulseitmagazine.com.au/2018/locked-article

But using the default template for an identical article, it does:
https://staging.pulseitmagazine.com.au/2018/locked-article-default

...hover over the login to read more links, which is the text I've used as a language override for this: COM_CONTENT_REGISTER_TO_READ_MORE

This was a problem way back with the Peak theme, which I've been using for years, never suspecting that it was the theme and not my implementation that broke the functionality.

Please advise how I can fix this - I referred to https://yootheme.com/support/question/86892 but didn't have much luck with the suggestion.

Thanks,
Simon

  • Joomla
  • General Question
  • Monday

2 Answers

2

Avatar hendrik Yootheme answered

Hi,

thanks for the hint, this issue unfortunately never has reached us.

We will fix this with a Warp Update, until this is released you can fix the link in warp/systems/joomla/layouts/com_content/article/default.php on line 65 add the following php code:

$link->setVar('return', base64_encode(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)));

Now the link should contain the return value and the users should be redirected to the article after the login.

UPDATE
As an additional note:
The Monday template does include an override for com_content/article/default.php in 'layouts' folder in the template root. So you will need to update this file also.

Regards

Edited

0

Avatar simon.mara.76 answered

Thanks Hendrik,

I edited both files via CPanel and seems to be working now in my staging site (Monday). Once the patch is rolled out, is there a better way for me to update the override file: layouts/com_content/article/default.php ?

In my live site (Peak), I assume I only need update the defaults.php file in warp/systems/joomla/layouts/com_content/article/default.php?

Thanks,
Simon

Know someone who can answer? Share a link to this question via email or twitter.