fisharebest / webtrees

Online genealogy
https://webtrees.net
GNU General Public License v3.0
488 stars 301 forks source link

List of submitters #3017

Closed AndreasRauhut closed 4 years ago

AndreasRauhut commented 4 years ago

Calling the list of submitters gives an error page. In the demo version this list ist hidden. `assert(): assert($submitter instanceof Submitter) failed …/app/Submitter.php:48

0 [internal function]: Fisharebest\Webtrees\Webtrees::Fisharebest\Webtrees{closure}(2, 'assert(): asser...', '/home/rauhut/wt...', 48, Array)

1 …/app/Submitter.php(48): assert(false, 'assert($submitt...')

2 [internal function]: Fisharebest\Webtrees\Submitter::Fisharebest\Webtrees{closure}(Object(stdClass), 0)

3 …/vendor/illuminate/support/Collection.php(1120): array_map(Object(Closure), Array, Array)

4 …/app/Http/Controllers/ListController.php(709): Illuminate\Support\Collection->map(Object(Closure))

5 …/app/Http/Controllers/ListController.php(544): Fisharebest\Webtrees\Http\Controllers\ListController->allSubmitters(Object(Fisharebest\Webtrees\Tree))

6 …/app/Module/SubmitterListModule.php(102): Fisharebest\Webtrees\Http\Controllers\ListController->submitterList(Object(Nyholm\Psr7\ServerRequest))

7 …/app/Http/RequestHandlers/ModuleAction.php(90): Fisharebest\Webtrees\Module\SubmitterListModule->getListAction(Object(Nyholm\Psr7\ServerRequest))

... ... ...`

fisharebest commented 4 years ago

Controllers/ListController.php(709

This error suggests that you have a record that is listed as a submitter, but which is not a submitter.

Can you look in the table wt_other for entries with o_type="SUBM".

Do you see anything unusual?

AndreasRauhut commented 4 years ago

Here is what I see in the line.

o_id | o_file | o_type 1 | o_gedcom
S0 | 36 | SUBM | 0 @S0@ SUBM 1 NAME Andreas Rauhut 1 ADDR Jasminweg...

fisharebest commented 4 years ago

The XREF of this record is s0 (lower case)

But the o_id column contains S0 (upper case)

This should not happen. These should be the same. Did you do anything that might have updated the database?

You should be able to fix this by updating o_id to s0

AndreasRauhut commented 4 years ago

You're right. It's curious. But this is written only here in the thread as lower "s".

In my table it is a upper "S" @S0@

PS: place your cursor over the @S0@ in the thread above.

AndreasRauhut commented 4 years ago

The editor changes it Damn!!

AndreasRauhut commented 4 years ago

Try it yourself, please. I wrote an UPPER "S"

AndreasRauhut commented 4 years ago

wt_other

AndreasRauhut commented 4 years ago

Sorry I didn't want to close anything.

fisharebest commented 4 years ago

Do you have an S0 entry in any other table. For example wt_sources.

AndreasRauhut commented 4 years ago

No. Sorry, there is a S1 entry but no S0 entry in wt_sources

fisharebest commented 4 years ago

Do you still have this problem?

I cannot reproduce it, and I cannot guess the problem.

Can you try something else.

Edit this file https://github.com/fisharebest/webtrees/blob/master/app/Submitter.php#L48

Before line 48 (assert(...)), can you add

var_dump($row, $submitter);
exit;
AndreasRauhut commented 4 years ago

In the meantime I did deactivate  the module "listing of submitters" so I didn't care about even after adding a new gedcom. After reactivation today, the listing seems to work fine.By the way, I can't investigate, because I'm not at home for a moment. Please close the issue.  Thank you. Am 19.02.2020 16:49 schrieb Greg Roach notifications@github.com:Do you still have this problem? I cannot reproduce it, and I cannot guess the problem. Can you try something else. Edit this file https://github.com/fisharebest/webtrees/blob/master/app/Submitter.php#L48 Before line 48 (assert(...)), can you add var_dump($row, $submitter); exit;

—You are receiving this because you modified the open/close state.Reply to this email directly, view it on GitHub, or unsubscribe.