[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EP-tech] auto-X.Y.Z.css



CAUTION: This e-mail originated outside the University of Southampton.
As a (hopefully useful) side note, the Apache Rewrite ruleset will honour URLs for the auto css and javascript that match e.g.
style/auto-3.3.10.css
style/auto-3.3.101.css
style/auto-3.3.10999.css
style/auto-3.3.100000.css
- any amount of digits (but only digits) before the '.css' or '.js'.

This can be used to force newer versions of the auto- files into browsers.

For recent versions of EPrints, I think you can copy lib/cfg.d/template_core.pl into the archive config file.
I would suggest changing this line:
href => $repo->current_url( path => "static", "style/auto-".EPrints->human_version.".css" ),
to:
href => $repo->current_url( path => "static", "style/auto-".EPrints->human_version."1.css" ), #note '1' before '.css'

Next time you need to force a different auto CSS or JS file, update the digit, or remove it!

For older versions of EPrints (3.3.10, possibly beyond), where the loading of config files from various different directories worked a little differently, and overriding files from lib/cfg.d/ wasn't as simple as copying them to the local config, you could make a lovely hack, intercepting the template pins and adding extra digits to them:
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgist.github.com%2Fjesusbagpuss%2Fc5ae75d8cbafb902af8299ec57101d8c&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C283988c0765944a9d69508da293451cd%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637867601928147126%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2FOFJG3RtgfI%2BQE5RquvoBG1ZiUXIqTi6nbqtyzfqFlg%3D&reserved=0

I'm not /recommending/ the above hack - but we had it running like that without incident on 3.3.10 for a number of years!

Cheers,
John


From: eprints-tech-bounces at ecs.soton.ac.uk [mailto:eprints-tech-bounces at ecs.soton.ac.uk] On Behalf Of David R Newman via Eprints-tech
Sent: 28 April 2022 16:50
To: eprints-tech at ecs.soton.ac.uk; Yuri <yurj at alfa.it>
Subject: Re: [EP-tech] auto-X.Y.Z.css


Hi Yuri,

This is in lib/cfg.d/template_core.pl.  This file may also be in your archive's cfg/cfg.d/ directory or possibly even the flavours/pub_lib/cfg.d/ directory if you are on 3.4.

This is the block of code you need to update (around line 39):

 $head->appendChild( $repo->xml->create_element( "link",
            rel => "stylesheet",
            type => "text/css",
            href => $repo->current_url( path => "static", "style/auto-".EPrints->human_version.".css" ),
        ) );

Regards

David Newman
On 28/04/2022 4:41 pm, Yuri via Eprints-tech wrote:

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



Hi!



  where's the code/template that generates the link in the head to

auto-X.Y.Z.css? I've modified it, but it is cached in the browser for a

month. I need to change it in order to people to get the changes without

asking them to clear the cache.



Thanks!





*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmailman.ecs.soton.ac.uk%2Fmailman%2Flistinfo%2Feprints-tech&amp;data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C283988c0765944a9d69508da293451cd%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637867601928147126%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=9amPLTK3RbAxsb2X6E4wO9lE1KUbCPdhdxhiTy0wU8Y%3D&amp;reserved=0>

*** Archive: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C283988c0765944a9d69508da293451cd%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637867601928147126%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=0hB2QVd%2BIN72SBRGQQ0s7eocghvhj4B8VrHDC8HC9bA%3D&amp;reserved=0!<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C283988c0765944a9d69508da293451cd%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637867601928147126%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=0hB2QVd%2BIN72SBRGQQ0s7eocghvhj4B8VrHDC8HC9bA%3D&amp;reserved=0>

 AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=qD%2Bac2q85kHMQ9C%2FngNKXI03jrGh0s52kqxiJefoXQs%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C283988c0765944a9d69508da293451cd%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637867601928147126%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=0hB2QVd%2BIN72SBRGQQ0s7eocghvhj4B8VrHDC8HC9bA%3D&amp;reserved=0>

*** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C283988c0765944a9d69508da293451cd%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637867601928147126%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=LDuAu%2FS%2FtG596IXe935JVvU3jgbW0bnV%2F6n%2FMPRPHWo%3D&amp;reserved=0!<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C283988c0765944a9d69508da293451cd%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637867601928147126%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=LDuAu%2FS%2FtG596IXe935JVvU3jgbW0bnV%2F6n%2FMPRPHWo%3D&amp;reserved=0>

 uMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=Mjmd7ryQW69R5WYd6mS%2FU5JtKGpw%2FU3rB6EXpf8xMKE%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C283988c0765944a9d69508da293451cd%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637867601928147126%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=LDuAu%2FS%2FtG596IXe935JVvU3jgbW0bnV%2F6n%2FMPRPHWo%3D&amp;reserved=0>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20220428/0159f1ce/attachment-0001.html