Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix home #1784

Open
wants to merge 61 commits into
base: master
Choose a base branch
from
Open

Fix home #1784

wants to merge 61 commits into from

Conversation

hgouraud
Copy link
Collaborator

@hgouraud hgouraud commented Apr 19, 2024

use Perso.interp_templ rather than Util.open_etc_file
The latter does not interpret (or remember) the %let commands found in the template file.
This modification removes multiple errors appearing when the home.txt template file was called (undefined rng, random).
The fix has not been applied to Notes display as the base parameter is not available in this context.
For another case, the use of Perso.interp_templ created a dependency cycle!

@a2line
Copy link
Collaborator

a2line commented Apr 20, 2024

Première remarque : j'ai des erreurs à la pelle en visiteur quand je ne suis pas connecté, alors que ça a l'air fonctionnel en magicien.

@michelmno
Copy link
Contributor

I tested last update of this PR with cid b74350e, and for some individual with no parents, the error message is switching from unbound var "sosa_ref.key" already tracked by issue #1778 to warning must test "has_parents" as extracted below.

[2024-04-23 05:50:43]: WARNING ./etc/modules/arbre_3gen_photo.txt 1447-1447: since v5.00, must test "has_parents" before using "mother"
[2024-04-23 05:50:48]: WARNING ./etc/modules/arbre_3gen_photo.txt 1385-1385: since v5.00, must test "has_parents" before using "father"

@hgouraud
Copy link
Collaborator Author

thanks for the test. fixed in c03357e

@hgouraud
Copy link
Collaborator Author

I tried to build some sort of regression test.
Can be expanded by adding additional commands
Look at test/run-GW-test.sh
You have to "personalize" according to your own base for some of the commands
Tell me what you think, and of possible improvements

@michelmno
Copy link
Contributor

I am suggesting a script change in michelmno@146f10a

@michelmno
Copy link
Contributor

first run with my DB is reporting:

[2024-04-24 07:34:28]: WARNING ./etc/buttons_dag.txt 6547-6548: since v5.00, must test "has_parents" before using "mother"
[2024-04-24 07:34:28]: WARNING ./etc/buttons_dag.txt 6564-6565: since v5.00, must test "has_parents" before using "mother"
[2024-04-24 07:34:28]: WARNING ./etc/buttons_dag.txt 8178-8179: since v5.00, must test "has_parents" before using "father"
[2024-04-24 07:34:28]: WARNING ./etc/buttons_dag.txt 8195-8196: since v5.00, must test "has_parents" before using "father"

@a2line
Copy link
Collaborator

a2line commented Apr 25, 2024

Pleas DON’T merge this PR. It is draft. I see a lot of mistakes to be fixed: double titles + double HTML headers on some .ml pages, menubar removed from carousel or not working at all on some old pages…

@michelmno
Copy link
Contributor

another error detected by run-GW-test.sh when invalid p value
http://localhost:2317/testbasefusionnee?m=FORUM&p=939
generating a critical error
[2024-04-26 08:46:51]: CRITICAL testbasefusionnee_w?m=FORUM&p=939 Invalid_argument("rseek_in")
Should I create a specific issue ?

@hgouraud
Copy link
Collaborator Author

hgouraud commented Apr 26, 2024

yes. In fact no, this test is too base specific and the failure is inevitable.
I am pushing an update for run-GW-test following your modifications

@hgouraud hgouraud force-pushed the fix-home branch 4 times, most recently from c4fce82 to 007f027 Compare April 27, 2024 05:37
crl "m=DEL_IND&i=$ID"
crl "m=MRG&i=$ID"
crl "m=CHG_EVT_IND_ORD&i=$ID"
crl "m=NV_FAM&i=$ID&f=$FID" # f=family_id is base specific!
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume 'NV_FAM' is a typo, and should be 'INV_FAM' ?

crl "m=CHG_EVT_IND_ORD&i=$ID"
crl "m=NV_FAM&i=$ID&f=$FID" # f=family_id is base specific!
crl "m=CHG_EVT_FAM_ORD&i=$FID&ip=$ID"
crl "m=DEL_FAM&i=$FID&ip=$FID$ID1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there missing characters in "&ip=$FID$ID1"

@michelmno
Copy link
Contributor

@hgouraud, I have new changes proposal for test/run-GW-test.sh in cid michelmno@e514bdd

Using it in my environment is reporting CRITICAL errors similar to issue #1788 when url parameters are not valid. But also some unbound failures as detailed in attached log
gwd_cgi_tst_error.extract.log

factorize header + place/date_popup functions in new table_utils subtemplate
fix headers for Firefox
simpler conditions for tooltip (wip)
@hgouraud
Copy link
Collaborator Author

@canonici, @ilankri, can you review? This is not WIP anymore

* A new javascript function hide level btn > 12 (hard fixed atm,
but quite strange if max=13…), perhaps we need to remove the hiding "-" button,
it's not really usefull and can take a line for itself in some cases!
* Load once js function to copy the caution in title of every high v buttons.
* Hide the whole generation selector toolbar when not needed.
* Fix selected v in toolbar when evar.v > max_ancestor_level
and also e_v value for that case.

Also:
* Fix some rendering for some cases (fixing max_anc).
* Remove gen in title and fix left margin vs container-fluid.
* Fix him/her box, add a translation for neutral sex (iel in fr).
* Remove generation reminder (big numbers on left) if v<4.
* Add minimalist tooltips for each statistics.
* Rollback menubar default v= to 7 (was downgraded to 3).
hgouraud and others added 15 commits May 28, 2024 23:23
* Ajust max_level, print max level on + button tooltip
* Add curlev+1 to print right box-drawing caracteres when individual has
descendant(s) at the hidden v+1 generation (not really estheatical but info was missing)
* Better anc/deslist icons for button bar and menubar.
* Add missing fa-rotate-90 in CSS!
* Fix left margin overlaping home.
* replace sort functions by a lone polyvalent function
* use order:-1 to sort descreasingly
* sort by age using julian day “ages”
* cleaner code
Notation is now the same as in destable
Add short title and use monospace font for notation
fixes level 0 for desc1, also adapt title, add extend possibility to v+ button and remove useless total
display relation date in small, remove bold for married/italic for not_married, switch to X for not_married instead
move id/d-none for filters to the form itself to remove superflous line
center title in ancestor picker modal
my bad!
Add two new targets to patch/unpatch bin/ged2gwb/dune.in and ged2gwb.ml in
order that all various build work again. The perl regexps are compatible
between all OS (sed one are diverging between Unix and BSD). This modification
should be transparent for every usages. The "distrib" target has been reworked
a bit to allow “make fmt distrib” used on Github Action CI.
… white

add a new simple “gwd” target to build only gwd executable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants