Treeview in french culture not loading

49 views
Skip to first unread message

r.ruti...@docuteam.ch

unread,
May 4, 2022, 6:07:46 AMMay 4
to AtoM Users
Hi,

I have a strange behavior here. The treeview loads for all languages (german, english, italian) but not in french. 

I found out the URL that is actually loaded:

(works)

(blank page, and most important: no error message in any of the log files)

Do you have an idea what the cause is?

Cheers, Roger

Dan Gillean

unread,
May 4, 2022, 10:41:55 AMMay 4
to ICA-AtoM Users
Hi Roger, 

I will see if I can reproduce this issue locally. What is the default installation culture of this site? What is the full version number listed in Admin > Settings? And, do you have French added via the language settings (and have you reindexed since adding it)?

Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him


--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/087aa50f-58a6-4bb5-9c63-6b466d8401a7n%40googlegroups.com.

r.ruti...@docuteam.ch

unread,
May 4, 2022, 11:00:24 AMMay 4
to AtoM Users
Hi Dan,

The default is "de" (german). 
Full version: 2.6.3 - 184
And yes, french is added via the language settings, and reindexing ran several times since.

Thank you for looking into this!

Cheers, Roger

Dan Gillean

unread,
May 5, 2022, 9:40:52 AMMay 5
to ICA-AtoM Users
Hi Roger, 

I've done a bit of testing, and so far have been unable to reproduce this issue in my local qa/2.x environment. So, either the issue is addressed in our development branch, or (perhaps more likely) there is some local issue occurring. Can you provide me with a bit more information?

First, how exactly are you arriving at these example URLs? Typically the treeview is displayed on the information object view page (which just uses the slug of the description) - there's not normally a /fullWidthTreeView?nodeLimit=10000 part of the URI that I recall. The hierarchy browser (for browsing all information objects) uses /browse/hierarchy

Is this happening to all descriptions or just some? Were the descriptions in question created in the UI, or via import such as a CSV? If via UI, were they created first in the German interface, or the French one? If imported, what was the culture column value used?

Does your site include any custom code (including a custom theme)? Anything else that might help us narrow down the issue?

Thanks,

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him

r.ruti...@docuteam.ch

unread,
May 5, 2022, 9:59:33 AMMay 5
to AtoM Users
Hi Dan,

These URLs that I mentioned are those that are being loaded in the background for the treeview box, when I view a description (i have set to "full width" in the treeview settings). I don't know how I found out, either by using Chrome's developer tools or by looking into the treeview.js file.
Anyway - the complete treeview at /browse/hierarchy does work for all cultures except french, too. I only see the loading icon.
index.php/browse/hierarchy?sf_culture=fr   NOT OK
index.php/browse/hierarchy   OK
So it seems like it does not work for all the descriptions. 

The descriptions were created by EAD.xml import via GUI. A culture was not set (see my other recent conversation, you probably remember, https://groups.google.com/g/ica-atom-users/c/diZzGdQoj-U) , the default culture "de" was used. I don't think that's a problem in general, as for the same procedure, in italian,  the treeview works.

The site uses a custom theme, for more than a year now, without problems. It's based on the default theme and only has different css stylings.

I can't think of anything different now

Dan Gillean

unread,
May 5, 2022, 4:11:32 PMMay 5
to ICA-AtoM Users
Hi Roger, 

Thanks for the additional information. 

I spoke with one of our developers who had the following suggestions: 

First, based on that internal URL with the nodeLimit=10000 parameter, it's possible that the issue is that an out of memory (OOM) error is occurring silently when trying to load the treeview. Do you have the following setting configured?
Try setting it to a lower value, and see if it helps. You might want to clear the application cache and restart PHP-FPM first, just in case. I have no idea why this would only affect French, but it's worth seeing what we can find out. 

Additionally, you could try enabling Debug mode to see if the qubit_dev.php front-end can provide any additional debugging information. You may first need to make some config changes to enable this - see: 
Between that, your webserver error logs, and the browser developer tools, it would be good to check for any related errors. On this, our developer says: 

He should be getting some HTTP response to the request, and it would be good to know if it's a 200 OK, or a 500 Internal server error, or something else. If it's a 200 response, then it's just returning an empty page. If it's a 500 error, something is broken. And if it's a 403 error, it's a permissions thing.

Let me know what you find! 

Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him

r.ruti...@docuteam.ch

unread,
May 9, 2022, 5:51:37 AMMay 9
to AtoM Users
Hi Dan,

In fact, I have a JS error
atom-js-error-fr.PNG

The Firefox network analytics (part of developer tools) show all loaded resources with 200 status code, except for 2 image resources from gravatar.com which yield a 403.
The GET request for fullWidthTreeView?nodeLimit=10000&firstLoad=true returns 200, so that should be fine.
It is really the JS error that causes the problem.

Cheers, Roger

José Raddaoui

unread,
May 9, 2022, 9:11:02 AMMay 9
to AtoM Users
Hi Roger,

Thanks for looking at the JS error. It seems to be happening when that 200 response is being parsed. Maybe a French character is breaking that JSON blob, could you check that response directly? The URL should be ".../browse/hierarchyData?nodeLimit=10000&sf_culture=fr" and you should see a response like this example, with a list of nodes and a total count.

Also, from the error in the browser console, it looks like the response is parsed in line 112 (qa/2.x) instead of line 110 (stable/2.6.x). Hopefully we find the issue by looking at that response, but I wonder if it could be related to that too.

Best,
Radda.

r.ruti...@docuteam.ch

unread,
May 9, 2022, 10:28:37 AMMay 9
to AtoM Users
Hi Radda,

Thank you. I tried the direct response, but the page is white, no data.
atom-lang-error2.PNG

In fact I am using the latest version of the fullWidthTreeView.js. It is line 112 instead of line 110 because I had some js output added in the process of finding the error
111: //         console.log(response);
112:                  var data = JSON.parse(response);


Cheers, Roger

José Raddaoui

unread,
May 9, 2022, 3:12:32 PMMay 9
to AtoM Users
Hi again Roger,

Hard to tell then without looking at the actual data. I see you're facing the error on the full hierarchy browse page, is it the same on all archival description pages? Maybe by checking some top-level descriptions we can narrow down the issue.

Best,
Radda.

r.ruti...@docuteam.ch

unread,
May 11, 2022, 1:20:42 AM (13 days ago) May 11
to AtoM Users
Hi Radda
The error appears on every treeview by the culture of "fr", no matter if on full hierarchy browse page, or in an archival description on top level or low level.
I would troubleshoot more If I knew where to start. Maybe you know some other place in the code that i could var_dump() or so?
Cheers, Roger

José Raddaoui

unread,
May 11, 2022, 12:14:18 PM (13 days ago) May 11
to AtoM Users

Hi Roger,

Hard to know without looking at the actual data then. Most of the PHP code involved in that request is in ...


For example, you could check the $results variable to see if the records were fetched from the database, or the $data variable to check the final records before JSON conversion, or in between to check the data transformation.

I hope that helps,
Radda.

r.ruti...@docuteam.ch

unread,
May 16, 2022, 4:55:21 AM (8 days ago) May 16
to AtoM Users
Thank you Radda. I found out why it did not work.

The customer asked met to do some changes, namely to show "(d)" instad of "(Draft)".
So I did the following changes in fullTreeViewAction.class.php on line 209, 

$status_short = " <span style=\"font-size:9px;font-style:italic;\">(".substr($status,0,1)).")</span>";
$result['text'] = "{$result['text']}{$status_short}";
/* $result['text'] = "({$status}) {$result['text']}"; */


In french, "Draft" is "Ébauche", so the first letter "É" was the reason the data could not be computed as it does not output "É" but something weird (encoding problem)
So I hardcoded the letter for all languages

$status_short = " <span style=\"font-size:9px;font-style:italic;\">("."D".")</span>";

Thank you
Roger

José Raddaoui

unread,
May 16, 2022, 3:19:08 PM (7 days ago) May 16
to AtoM Users
Thanks for reporting back Roger, glad you found the issue!
Reply all
Reply to author
Forward
0 new messages