?
avatar ReLater
ReLater
10 Mar 2021

Steps to reproduce the issue

In file components/com_content/tmpl/article/default.php:

<?php 
if (isset($urls) 
&& ((!empty($urls->urls_position) && ($urls->urls_position == '0')) 
|| ($params->get('urls_position') == '0' && empty($urls->urls_position)))
|| (empty($urls->urls_position) && (!$params->get('urls_position')))) : ?>
stdClass Object
(
    [urla] => /leistungen/dach
    [urlatext] => wqwewqqw
    [targeta] => 
    [urlb] => 
    [urlbtext] => 
    [targetb] => 
    [urlc] => 
    [urlctext] => 
    [targetc] => 
)
  • The only part in these lines that makes sense for me is $params->get('urls_position').

???Am I missing something????

avatar ReLater ReLater - open - 10 Mar 2021
avatar joomla-cms-bot joomla-cms-bot - change - 10 Mar 2021
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 10 Mar 2021
avatar ReLater ReLater - change - 10 Mar 2021
The description was changed
avatar ReLater ReLater - edited - 10 Mar 2021
avatar ReLater ReLater - change - 10 Mar 2021
The description was changed
avatar ReLater ReLater - edited - 10 Mar 2021
avatar ReLater ReLater - change - 10 Mar 2021
The description was changed
avatar ReLater ReLater - edited - 10 Mar 2021
avatar ReLater ReLater - change - 10 Mar 2021
The description was changed
avatar ReLater ReLater - edited - 10 Mar 2021
avatar ReLater ReLater - change - 10 Mar 2021
The description was changed
avatar ReLater ReLater - edited - 10 Mar 2021
avatar ReLater ReLater - change - 10 Mar 2021
The description was changed
avatar ReLater ReLater - edited - 10 Mar 2021
avatar joomdonation
joomdonation - comment - 10 Mar 2021

@ReLater You read the code correctly. There are something wrong with the code exactly as you described, so please make a PR to correct it.

avatar chmst
chmst - comment - 10 Mar 2021

As much as I see this is since 8 years and apparently nobody used it.

avatar dgrammatiko
dgrammatiko - comment - 11 Mar 2021

May I say something here?

If this is the code that exists in the J3 then it's safe to say that the option for rendering the urls to the top or the bottom was never used by NOBODY the last 8 years!!!
Just remove it. Same can be said for many other options...

avatar ReLater
ReLater - comment - 12 Mar 2021

It was used (e.g. by me) but the fun is that the result is the same if we would just use

if ((int) $params->get('urls_position') === 0)

I stumbled over these lines 1000 times in the last years whenever I created an override and just wondered that they are still there in Joomla 4 ;-)

But in principle you are right. I would replace it with a setting "Display links: Yes/No" and display them below by default. Then there are 3 understandable lines of code that can be easily moved in an override if somebody wants the links above.

avatar ReLater
ReLater - comment - 12 Mar 2021

Aaaaaah: #9491 (comment)

avatar ReLater ReLater - change - 17 Mar 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-03-17 13:04:31
Closed_By ReLater
avatar ReLater ReLater - close - 17 Mar 2021
avatar ReLater
ReLater - comment - 17 Mar 2021

See pr #32713

Add a Comment

Login with GitHub to post a comment