Jefferson49/RepositoryHierarchy

PHP error "Call to a member function url() on null" if "Source facts to show for sources within source citations" is used

macRaizel opened this issue · 8 comments

original posted problem: Installed and did basic configuration (to see if error disappeared, turned off some). Saw error which mentions Vesta module that I have installed.

<followup....>
Will have to turn the module on and seeing if I can replicate error. I assume you're referring to supplying the GEDCOM code for the record which was random. I happened to be on that person's record but don't remember who. So will note that when I experiment again.

Reported in webtrees forum, #102126

PHP error:
Call to a member function url() on null …/modules_v4/repository_hierarchy/resources/views/source-facts-within-citation.phtml:60

Full stack trace:
error.txt

Can be reproduced, if a source contains a wrong XREF to a repository, e.g. if X1234 does not exist in the following example:

0 @I9117@ INDI
1 BAPM
2 DATE 31 JAN 1881
2 SOUR @S10698@

0 @S10698@ SOUR
1 REPO @X1234@

You can search for this error, if you check the webtrees tree in the control panel:

Control panel / Manage family trees / Check for errors

webtrees_check_for_errors

It might be possible to search in the browser for "Source:" or "does not exist".

I fixed all errors and turned on RepositoryHierarchy. It does work. What I noticed is without anything checked in Settings for Repository Hierarchy list is the Publication shows (desired) but so too Author, Repository, Notes(undesired). Didn't see option to show just the Publication.

In the new layout for the settings, you need to select or un-select each of the facts.

You can un-select by clicking on the label (e.g. "Author"). You can add by choosing from the drop down menu.

image

Is there newer version than repository_hierarchy_v1.3.7?

Yes, v1.3.8

See release area in GitHub

Installed. Working. Thank you.