EPrints Technical Mailing List Archive

See the EPrints wiki for instructions on how to join this mailing list and related information.

Message: #10034


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

RE: [EP-tech] Phrase Editor not working


CAUTION: This e-mail originated outside the University of Southampton.

Hi, Andrew

I managed get back earlier than I thought and quickly dug into this. I think I am beginning to see the wood for the trees, but still working on getting it resolved. Here are my answers to your questions, first:

What happens when you log in to your repository as the admin, and visit:
cgi/users/home?screen=Admin%3A%3APhrases
------------------------------------------------------------------------------------
*  I get We can’t connect to the server at cgi. Did you mean to go to https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.cgi.com%2Fusers%2Fhome%3Fscreen%3DAdmin%253A%253APhrases&data=05%7C02%7Ceprints-tech%40ecs.soton.ac.uk%7C4b0e60bbc9af4aec863408dd60e235d1%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638773246892570580%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=515c%2FG03gt4dF68mgWJ1ppXWKWXbqLQyH%2F26L%2BBsmiI%3D&reserved=0? If you entered the right address, you can: Try again later, Check your network connection, Check that Firefox has permission to access the web (you might be connected but behind a firewall)
*And in the Firefox Debugging Console I see this alert: HTTPS-Only Mode: Upgrading insecure request “http://cgi/users/home?screen=Admin%3A%3APhrases”; to use “https”. This is typical of many of the errors I am seeing about mixed http and https
------------------------------------------------------------------------------------
What happens when you visit a page on which you'd like to change a phrase, and add...
edit_phrases=yes
...to the end of the url (with either ? or & depending if it is the first query or a subsequent query)...?
------------------------------------------------------------------------------------
* Mixed Content: Upgrading insecure display request ‘https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Farcomabstracts.com%2Fstyle%2Fimages%2Flightbox%2Floading.gif%25E2%2580%2599&data=05%7C02%7Ceprints-tech%40ecs.soton.ac.uk%7C4b0e60bbc9af4aec863408dd60e235d1%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638773246892588794%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=eajBcH4%2BpxNYpi%2BQHtOGqipyTNN3PNgRf2Q69I5KZR0%3D&reserved=0 to use ‘https’
* Mixed Content: Upgrading insecure display request ‘https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Farcomabstracts.com%2Fstyle%2Fimages%2Flightbox%2Fcloselabel.gif%25E2%2580%2599&data=05%7C02%7Ceprints-tech%40ecs.soton.ac.uk%7C4b0e60bbc9af4aec863408dd60e235d1%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638773246892600533%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=%2BmCAf9Twwy3vHjhW0ZwIrn3WPmSRfRnX2%2FWowYrHgRs%3D&reserved=0 to use ‘https’
These are the kind of errors I am getting in the console from all kinds of page. Basically, browsers are being served predominantly https with some files in http
------------------------------------------------------------------------------------
The phrase editor simple edits xml files that contain phrases.
The system phrases are here:
opt/eprints3/lib/lang/en/phrases/system.xml
The Publication Flavour's phrases are here:
/opt/eprints3/flavours/pub_lib/lang/en/phrases/pub_phrase.xml
------------------------------------------------------------------------------------
* Aha! Finally, the location of the base file for system phrases. Thank you, this might be all I need...  OK< I set up the new phrases correctly and now I do not get the error messages about the missing phrases. Great progress, thank you!
------------------------------------------------------------------------------------
...and you can create your own variations for your local needs, by creating a...
opt/eprints3/archives/arcom/cfg/lang/en/phrases/zzz_local.xml
...file. I believe file precedence is based on alphabetical order, so if you want your settings to override zz_webcfg.xml, then your settings will need to be later in the alphabet that zz_webcfg - hence suggesting zzz_local.xml for the file name.

If it's specifically thesis names you wish to change, you can try running a grep search for existing thesis names, to see where they might be currently being drawn from. For example, on my system...

---
[Mon 10 Mar 2025 09:45:47 GMT eprints3]$ grep -rni 'DPhil' .
./flavours/pub_lib/cfg.d/eprint_fields_pub.pl:149:              dphil
./lib/lang/en/phrases/system.xml:612:    <epp:phrase
id="eprint_fieldopt_thesis_name_dphil">DPhil</epp:phrase>
---
Mixed Content: Upgrading insecure display request ‘https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Farcomabstracts.com%2Fstyle%2Fimages%2Flightbox%2Fcloselabel.gif%25E2%2580%2599&data=05%7C02%7Ceprints-tech%40ecs.soton.ac.uk%7C4b0e60bbc9af4aec863408dd60e235d1%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638773246892619764%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=QBkL629UijBqDOXc11GxRFVa6WpzcnCgaT%2BxUfkGiLA%3D&reserved=0 to use ‘https’hD

If I wish to cash Dr Phil outside (Bhad Bhabie Cash Me Outside meme reference), he can be found declared as a field in eprint_fields_pub.pl and has an associated phrase in system.xml - i.e.
at the system level.

Of course, the publications flavour of EPrints will have its own phrases...
/opt/eprints3/flavours/pub_lib/lang/en/phrases/pub_phrase.xml

...and then you can have your own phrases too, at the repository level:
opt/eprints3/archives/arcom/cfg/lang/en/phrases/zzz_local.xml
------------------------------------------------------------------------------------
I shall explore this now, at leisure. For now, I can move to the next puzzle. I think the next task is to eliminate the mixed http/https errors. I have gone into Cloudflare and ensured that   . Then I checked the setting to enable automatic https rewrites at the Cloudflare level. There is a warning there:

<<Some resources are loaded by JavaScript or CSS via HTTP when the site is loaded in a browser. You will see mixed content warnings in those situations. To determine which URLs do not have HTTPS support, Cloudflare uses data from EFF’s HTTPS Everywhere ↗ and Chrome’s HSTS preload list ↗. If your zone is not on one of these lists, only active content will be rewritten. Passive content (such as images) will not be rewritten and will still cause mixed content errors.>>

This exactly fits the error messages I see in the console when phrase editor fails to load. My Eprints is configured to Port 80, and I guess I need to change that Port 443, amongst some other settings in 10_core.pl; but I see that I should not edit that directly. Instead, I guess I should be re-running bin/epadmin config_core ARCHIVEID so that I can try to ensure there is only https being served up. I have to find out more about SSL configuration, I think?

Best wishes

Will



-----Original Message-----
From: eprints-tech-request@ecs.soton.ac.uk <eprints-tech-request@ecs.soton.ac.uk> On Behalf Of Andrew M
Sent: 11 March 2025 09:27
To: eprints-tech@ecs.soton.ac.uk
Subject: Re: [EP-tech] Phrase Editor not working

[You don't often get email from eprints-tech@unitedgames.co.uk. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]

CAUTION: This e-mail originated outside the University of Southampton.

CAUTION: This e-mail originated outside the University of Southampton.

Hope this worked out for you (or works out for you on Wednesday).

I had a draft reply I didn't have time to finish on Monday, so it was good to see Thomas stepping in, and you figuring most of it out anyway
- because my advice from Monday would have been centred on the local xml file attempt.

I'll copy and paste the draft below, and elaborate on it too.
I should mention, my own EPrints is 3.4.5, so there could be new ways of doing things in 3.4.6 I'm not aware of.

I'll try and install 3.4.6 on my AWS VM in due course.

======

----- Forwarded message from Andrew Mehta <Andrew@unitedgames.co.uk> -----
    Date: Mon, 10 Mar 2025 09:56:15 +0000
    From: Andrew M <eprints-tech@unitedgames.co.uk>
Subject: Re: [EP-tech] Phrase Editor not working
      To: eprints-tech@ecs.soton.ac.uk

What happens when you log in to your repository as the admin, and visit:
cgi/users/home?screen=Admin%3A%3APhrases

What happens when you visit a page on which you'd like to change a phrase, and add...
edit_phrases=yes
...to the end of the url (with either ? or & depending if it is the first query or a subsequent query)...?

The phrase editor simple edits xml files that contain phrases.
The system phrases are here:
opt/eprints3/lib/lang/en/phrases/system.xml
The Publication Flavour's phrases are here:
/opt/eprints3/flavours/pub_lib/lang/en/phrases/pub_phrase.xml

...and you can create your own variations for your local needs, by creating a...
opt/eprints3/archives/arcom/cfg/lang/en/phrases/zzz_local.xml
...file. I believe file precedence is based on alphabetical order, so if you want your settings to override zz_webcfg.xml, then your settings will need to be later in the alphabet that zz_webcfg - hence suggesting zzz_local.xml for the file name.

If it's specifically thesis names you wish to change, you can try running a grep search for existing thesis names, to see where they might be currently being drawn from. For example, on my system...

---
[Mon 10 Mar 2025 09:45:47 GMT eprints3]$ grep -rni 'DPhil' .
./flavours/pub_lib/cfg.d/eprint_fields_pub.pl:149:              dphil
./lib/lang/en/phrases/system.xml:612:    <epp:phrase
id="eprint_fieldopt_thesis_name_dphil">DPhil</epp:phrase>
---

If I wish to cash Dr Phil outside (Bhad Bhabie Cash Me Outside meme reference), he can be found declared as a field in eprint_fields_pub.pl and has an associated phrase in system.xml - i.e.
at the system level.

Of course, the publications flavour of EPrints will have its own phrases...
/opt/eprints3/flavours/pub_lib/lang/en/phrases/pub_phrase.xml

...and then you can have your own phrases too, at the repository level:
opt/eprints3/archives/arcom/cfg/lang/en/phrases/zzz_local.xml


======

Of course, from the sounds of things, you appear to be well on your way to creating your own file instead of zz_webcfg.xml - so I look forwards to hearing how that goes. Again, stuff later in the alphabet, overwrites stuff earlier in the alphabet filename wise - so you may wish to make it zzzz_file rather than simply z_file, =), just to be safe, ;-).

Let us know how it goes on Wednesday!

Yours,
Andrew.


Quoting Will Hughes <w.p.hughes@reading.ac.uk>:

> CAUTION: This e-mail originated outside the University of Southampton.
> CAUTION: This e-mail originated outside the University of Southampton.
> Thomas
>
> Thanks for the quick response. Yes, I spent a lot of time examine the
> console in the web browser, trying to pick apart any JavaScript
> restrictions. Those things are a bit of a dark art to me. I can try
> with a vanilla installation of a bare bones browser to see whether
> that makes a difference.
>
> I'm interested in simply making my own z_file instead of zz_webcfg.xml
> - I hadn't thought of that. I'll try that as well when I get back to
> my desk on Wednesday.
>
> Cheers!
>
> Best wishes
>
> Will
> ____
>
> ________________________________
> From: th.lauke@arcor.de <th.lauke@arcor.de>
> Sent: Monday, March 10, 2025 3:23:36 pm
> To: Will Hughes <w.p.hughes@reading.ac.uk>;
> eprints-tech@ecs.soton.ac.uk <eprints-tech@ecs.soton.ac.uk>
> Subject: AW: [EP-tech] Phrase Editor not working
>
> [You don't often get email from th.lauke@arcor.de. Learn why this is
> important at https://aka.ms/LearnAboutSenderIdentification ]
>
> Hi Will,
>
>> This site is running EPrints 3.4.6 (Creme Brulee Cryoseism) (EPrints
>> Services).
> okay, what about some restrictions on the execution of javascript(s)
> due to your browser?
>
>> I am familiar with the training video you mention. ... Similarly, if
>> I edit the zz_webcfg file, it has no effect ...
> Then insert your own file in this directory, which is safe from any
> programmatic modification
> (cf.&nbsp;https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2Fw%2FArchives%2FARCHIVEID%2Fcfg%2Flang%2Fen%2Fph&data=05%7C02%7Ceprints-tech%40ecs.soton.ac.uk%7C4b0e60bbc9af4aec863408dd60e235d1%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638773246892637891%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=Gw2xp6aQGfBZd59KMot%2BWk3D3eP7mU4HtnnPzlLF0LI%3D&reserved=0
> rases/) ... and do not forget to restart your Apache (by apachectl
> graceful, e.g.).
>
> Good luck
> Thomas