Bug in rating.php - Forum | JoomShaper
Staff replied Templates

Bug in rating.php

Asked by Ronny Buelund 3 years ago Last activity 3 years ago

In the file shaper_travelia/html/layouts/joomla/content/rating.php on line 15 - this code is not working in Joomla 4:
$layout = JRequest::getCmd('view', 'article');

I believe this template should be Joomla 4 compatible. Can you please provide me a fix asap, and also fix it in the tmeplate download package.

4 replies

Ofi Khan Staff

Hello Ronny Buelund

The template is Joomla 4 compatible. Make sure that you are using the latest version. Your shared link is not working. Please share the issue page link to check.

Best regards

‏‏‎ ‎J‏‏‎‎e‏‎‏‏‎‎n‏‏‎‎s W.‏‏‎
3 years ago · edited

@Ronny Buelund
To fix this issue, you can replace the line with the following Joomla 4 version.

Source: https://github.com/JoomShaper/Helix3/blob/master/templates/shaper_helix3/html/layouts/joomla/content/rating.php#L17

$layout = Factory::getApplication()->input->get('view', 'article');

@Ofi
I can confirm this issue, the rating.php is not compatible with Joomla 4.

How to reproduce:

  • Install Joomla 4.2.8
  • Install Travelia latest version 2.0.0
  • enable rating within the article configuration
  • change default template to travelia
  • view the frontpage

Ronny Buelund Asked this

I actually made this fix myself - but I would appreciate that Joomshaper fixed this problem in the package. When stating it is Joomla 4 compatible - then it should be that !

Ofi Khan Staff

Thanks for the update. Please share the fix if possible. I have already added this to the developer's board for checking. They will update it in the next release.

Log in to reply.