Web based family history software

Question Advanced search always empty

  • elysch
  • Topic Author
  • Offline
  • New Member
  • New Member
More
1 week 2 days ago #1 by elysch
Advanced search always empty was created by elysch
Hello all. Hope everybody is doing well.

I'm facing a problem I haven't been able to find a way around it.

I want to find all the individuals that have died in a specific country and I always get an empty result, even if I know there should be a result.

I tried the 2.1 demo site and there it's working ok, but it doesn't work in my site.

Found in app/Services/SearchService.php the following function:
Code:
public function searchIndividualsAdvanced(Tree $tree, array $fields, array $modifiers): Collection

In there, found that if I execute the query directly in the database, it generates a lot of output entries, but when executed in PHP, apparently it doesnt.

I added some debug messages:
Code:
 867 error_log('BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB: '. print_r($query->toSql(),true));  868 error_log('CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC: '. print_r($query->getBindings(),true));  869  870         return $query  871             ->get()  872             ->each($this->rowLimiter())  873             ->map($this->individualRowMapper())  874             ->filter(GedcomRecord::accessFilter())  875             ->filter(static function (Individual $individual) use ($fields, $tree): bool {  876                 // Check for searches which were only partially matched by SQL  877 error_log('DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD ');  878                 foreach ($fields as $field_name => $field_value) {  879                     $parts = explode(':', $field_name . '::::');  880  881 error_log('EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE '.print_r($parts, true));


I can see messages from lines 867 and 868 in the logs, but it never shows messages of lines 877 and 881.

The Query I mentioned is obtained in the line 867, using the parameters shown in the line 868.:
Code:
select distinct `wt_a_individuals`.* from `wt_a_individuals` inner join `wt_a_placelinks` as `wt_a_individual_placelinks` on `wt_a_individual_placelinks`.`pl_file` = `wt_a_individuals`.`i_file` and `wt_a_individual_placelinks`.`pl_gid` = `wt_a_individuals`.`i_id` inner join `wt_a_places` as `wt_a_individual_places` on `wt_a_individual_places`.`p_file` = `wt_a_individual_placelinks`.`pl_file` and `wt_a_individual_places`.`p_id` = `wt_a_individual_placelinks`.`pl_p_id` where `i_file` = 1 and `wt_a_individual_places`.`p_id` = 229

It throws 333 entries. Not all hava a death fact... but many do.

Any ideas on how to debug why it doesn't show anything?

Ely.

webtrees 2.1.20

Please Log in or Create an account to join the conversation.

  • bertkoor
  • Offline
  • Platinum Member
  • Platinum Member
  • Greetings from Utrecht, Holland
More
1 week 2 days ago #2 by bertkoor
Replied by bertkoor on topic Advanced search always empty
On 867/868 it has merely articulated the query to execute and has not executed it yet. Only at query execution it starts to take significant time and construct objects in memory.

The difference between the demo server and yours is surely database size and supposedly server configuration.

Personally I don't think this type of issues is worth debugging. Look at the usual suspects first: memory & execution time limits of the server.

And if you have not already, please read this:
webtrees.net/faq/xhr/

stamboom.BertKoor.nl runs on webtrees v2.1.20

Please Log in or Create an account to join the conversation.

More
1 week 2 days ago - 1 week 2 days ago #3 by fisharebest
Replied by fisharebest on topic Advanced search always empty
Code:
->filter(GedcomRecord::accessFilter())

This line filters out individuals that you do not have permission to see.

If there is data above this line, and not below this line, then perhaps comment it out. Does this make a difference?

Alternatively, try commenting out the "RowLimiter" line to see if that makes a difference.

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Last edit: 1 week 2 days ago by fisharebest.

Please Log in or Create an account to join the conversation.

  • elysch
  • Topic Author
  • Offline
  • New Member
  • New Member
More
1 week 1 day ago - 1 week 1 day ago #4 by elysch
Replied by elysch on topic Advanced search always empty

>filter(GedcomRecord::accessFilter())

If there is data above this line, and not below this line, then perhaps comment it out. Does this make a difference?

Yes. This made a difference. Now I get about 86 records. Why could this be happening? I
I logged in with an Admin account.

How to fix it?

webtrees 2.1.20
Last edit: 1 week 1 day ago by elysch.

Please Log in or Create an account to join the conversation.

More
1 week 1 day ago #5 by fisharebest
Replied by fisharebest on topic Advanced search always empty
What privacy rules have you set up.

It is possible to set up rules that hide data from admins - so being an admin doesn't guarantee you can see everything.

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

  • elysch
  • Topic Author
  • Offline
  • New Member
  • New Member
More
1 week 1 day ago - 1 week 1 day ago #6 by elysch
Replied by elysch on topic Advanced search always empty
As far as I can remember, only one media object of my own record is hidden. Is there a procedure to find out if there are more privacy rules?
(Have to say I'm the only one who enters information to the tree. Maybe I made a mistake before, who knows :) )

- - - - - - - - - - - - - - - - - - EDIT - - - - - - - - - - - - - - - - -

Found a setting in control panel about "Show private relationships" -> "Hide from everyone".

Below that , there is an empty list of "Privacy restrictions"

webtrees 2.1.20
Last edit: 1 week 1 day ago by elysch.

Please Log in or Create an account to join the conversation.

More
1 week 1 day ago #7 by fisharebest
Replied by fisharebest on topic Advanced search always empty
Perhaps share the information from the privacy settings page?

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum