Co-parents-in-law partnership incorrect
jpretired opened this issue · 10 comments
I have already seen this, but thought that it is only a bug in my development version. Thank you for reporting this!
I found the circumstances that bring about this issue.
They are:
- In the family tree the privacy setting Show living individuals is set to Show to members.
- The family tree is visited by an unlogged-in visitor.
- There is a living individual in the family of proband's child whose parents-in-law (i.e. proband's co-parents-in-law) the module is seeking after. Typically a proband's grandchild.
Then we can see this 'Partnership families[$key]->fullName() ?>'.
Similarly for children-in-law if a child-in-law is private (living):
I hope this may help.
It should be in this case "Partnership Private + Private" or "Child Private" if a family or a person cannot be shown.
I tried to reproduce the error, following your excellent analysis of the circumstances, but I was not successful. So I have to check this in more detail. Are you using the latest version of the module "extended family"?
If you wish, have a look at my family tree pages:
Co-parents-in-law:
https://www.jprodina.cz/tree/nase-rodina/individual/I605/Josef-Prause#tab-_hh_extended_family_
Children-in-law:
https://www.jprodina.cz/tree/nase-rodina/individual/I201/Frantisek-Prause#tab-_hh_extended_family_
Finally, I found it! It was a missing "=" sign!
The PHP code statement producing this is
<h5><?= I18N::translate('Partnership') ?> <? $group->families[$key]->fullName() ?></h5>
but it should be:
<h5><?= I18N::translate('Partnership') ?> <?= $group->families[$key]->fullName() ?></h5>
will be fixed in next release
GREAT!! Thank you very much! Was it difficult to find it?
Maybe you know that there are a few other similar buggy lines in file 'tab.phtml':
line 632, 700 and 702 with missing '=' sign after '<?'.
After correcting them it solves also the Children-in-law issue.
Yes. I looked at this point very often but didn't see it. My PHP version doesn't care about the missing "=", so I was not able to reproduce your issue. Finally, I have rewritten this part of the code and then I saw it.
Yes, when you know what is missing, it was easy to find all these lines.
I did not know that it may depend on PHP version. My PHP version is 7.4.24. What is yours?
There is an interesting Q/A about <?= tag:
https://softwareengineering.stackexchange.com/questions/151661/is-it-bad-practice-to-use-tag-in-php
You are right, it is not depending on the php-Version. Whether <?
is working or not is depending on parameters in php.ini.
Thanks for your link!