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

[EP-tech] Black overlay covers half of the webpage



I adjusted the <head> ... </head> section in my default.xml template as
here https://github.com/eprints/eprints/blob/3.3/lib/templates/default.xml,
and it fixed the problem.

Thanks for the help guys.

On Thu, Sep 28, 2017 at 10:45 AM, John Salter <J.Salter at leeds.ac.uk> wrote:

> Aah,
> I think if you remove that, it will work.
>
> The dynamic template that EPrints uses now adds some content in the <head>
> - one thing it adds is the link to the auto javascript (in the
> template_core.pl file mentioned previously).
>
> Let me know if that fixes it!
>
> Cheers,
> John
> ------------------------------
> *From:* eprints-tech-bounces at ecs.soton.ac.uk <eprints-tech-bounces at ecs.
> soton.ac.uk> on behalf of Mitocariu Emilian <mitocariu.emilian at gmail.com>
> *Sent:* 28 September 2017 08:21:25
> *To:* eprints-tech at ecs.soton.ac.uk
> *Subject:* Re: [EP-tech] Black overlay covers half of the webpage
>
> In secure.xml and default.xml, there is only this line with a <script>
> tag:
> <script src="{$config{secure_url}}/javascript/secure_auto.js"
> type="text/javascript"><!-- nope --></script>
>
> On Thu, Sep 28, 2017 at 10:11 AM, John Salter <J.Salter at leeds.ac.uk>
> wrote:
>
>> What <script>tags are there in your template for javascript/xxx files?
>> ------------------------------
>> *From:* eprints-tech-bounces at ecs.soton.ac.uk <
>> eprints-tech-bounces at ecs.soton.ac.uk> on behalf of Mitocariu Emilian <
>> mitocariu.emilian at gmail.com>
>> *Sent:* 28 September 2017 06:53:10
>>
>> *To:* eprints-tech at ecs.soton.ac.uk
>> *Subject:* Re: [EP-tech] Black overlay covers half of the webpage
>>
>> I have a template secure.xml, it's exactly the same as default.xml. I
>> renamed it to secure.xml.old, deleted the content
>> of [EPRINTS_ROOT]/archives/[ARCHIVEID]/html/ and generated the pages
>> again, but same problem.
>>
>> On Wed, Sep 27, 2017 at 6:49 PM, John Salter <J.Salter at leeds.ac.uk>
>> wrote:
>>
>>> Hi,
>>>
>>> [Hopefully Peter or someone will confirm whether 'secure.xml' is needed
>>> any more!]
>>>
>>>
>>>
>>> Do you have a template file called 'secure.xml' in your install?
>>>
>>> How does it compare with the 'default.xml' template?
>>>
>>>
>>>
>>> Looking at the code in the bin/generate_apacheconf, the default template
>>> might get copied (but not all cases are covered - e.g. templates in a
>>> theme).
>>>
>>> The javascript variables that differ between secure_auto.js and
>>> auto-3.3.15.js are now dynamically generated in [EPRINTS_ROOT]/lib/cfg.d/
>>> template_core.pl
>>>
>>> So I **think** the secure template isn't needed any more.
>>>
>>>
>>>
>>> If secure.xml exists, and you remove/rename it, does it all work OK?
>>>
>>>
>>>
>>> Cheers,
>>>
>>> John
>>>
>>>
>>>
>>> *From:* eprints-tech-bounces at ecs.soton.ac.uk [mailto:
>>> eprints-tech-bounces at ecs.soton.ac.uk] *On Behalf Of *Mitocariu Emilian
>>> *Sent:* 27 September 2017 15:36
>>> *To:* eprints-tech at ecs.soton.ac.uk
>>> *Subject:* Re: [EP-tech] Black overlay covers half of the webpage
>>>
>>>
>>>
>>> Every index.html file from [EPRINTS_ROOT]/archives/[ARCHIVEID]/html/en
>>> and other subdirectories contains these two lines:
>>>
>>> <script src="https://eprints.domain.com/javascript/secure_auto.js";
>>> type="text/javascript"><!-- nope --></script>
>>>
>>> <script type="text/javascript" src="/javascript/auto-3.3.15.j
>>> s"><!--padder--></script>
>>>
>>> I assume it should contain just one of the lines.
>>>
>>>
>>>
>>> Are these files generated with a template? Or what could make eprints to
>>> generate these files containing both those lines?
>>>
>>>
>>>
>>> On Wed, Sep 27, 2017 at 2:43 PM, Mitocariu Emilian <
>>> mitocariu.emilian at gmail.com> wrote:
>>>
>>> After a little investigation it seems that two javascript files are
>>> loaded: javascript/auto-3.3.15.js and javascript/secure_auto.js. Both
>>> contain the line "document.observe('dom:loaded', function () { new
>>> Lightbox(); });".
>>>
>>>
>>>
>>> On Wed, Sep 27, 2017 at 1:05 PM, Peter West <
>>> pjw at repositoryservices.co.uk> wrote:
>>>
>>> Hi John
>>> is this caused by a secure.xml template causing a duplicate call?
>>>
>>> Thanks
>>> Peter
>>>
>>> On 27/09/17 10:38, John Salter wrote:
>>> > OK - there is something else making the duplicated lightbox.
>>> >
>>> > I'm sure this has come up previously on the tech list, but I can't find
>>> > any mention of it now.
>>> >
>>> >
>>> >
>>> > In the javascript/auto-3.3.15.js file, the following line initiates the
>>> > lightbox:
>>> >
>>> > document.observe('dom:loaded', function () { new Lightbox(); });
>>> >
>>> >
>>> >
>>> > Either there is another line also adding a 'new Lightbox();', or
>>> somehow
>>> > the 'dom:loaded' event is being triggered twice.
>>> >
>>> >
>>> >
>>> > In the screenshot you have the browser development tools open. Do you
>>> > know how to use this to debug javascript?
>>> >
>>> > If so, you could try and see what is calling the Lightbox code.
>>> >
>>> >
>>> >
>>> > Cheers,
>>> >
>>> > John
>>> >
>>> >
>>> >
>>> > *From:*eprints-tech-bounces at ecs.soton.ac.uk
>>> > [mailto:eprints-tech-bounces at ecs.soton.ac.uk] *On Behalf Of *Mitocariu
>>> > Emilian
>>> > *Sent:* 27 September 2017 09:59
>>> > *To:* eprints-tech at ecs.soton.ac.uk
>>> > *Subject:* Re: [EP-tech] Black overlay covers half of the webpage
>>> >
>>> >
>>> >
>>> > I have one
>>> > file [EPRINTS_ROOT]/archives/[ARCHIVEID]/cfg/static/javascript/au
>>> to/90_local.js,
>>> > but I'm guessing that comes with eprints, plus the file only contains a
>>> > comment with some instructions.
>>> >
>>> >
>>> >
>>> > On Wed, Sep 27, 2017 at 11:30 AM, John Salter <J.Salter at leeds.ac.uk
>>> > <mailto:J.Salter at leeds.ac.uk>> wrote:
>>> >
>>> >     Hi,
>>> >
>>> >     I think what you're seeing is part of the 'lightbox' functionality.
>>> >
>>> >     You can see the repeated
>>> >
>>> >     <div id="overlay"?>
>>> >
>>> >     <div id="lightbox"?>
>>> >
>>> >     <div id="overlay"?>
>>> >
>>> >     <div id="lightbox"?>
>>> >
>>> >     in the screenshot you sent.
>>> >
>>> >     For some reason, the lightbox is being set up twice, but only the
>>> >     first overlay (which is the black box) is being hidden.
>>> >
>>> >
>>> >
>>> >     Do you have any custom javascript in
>>> >     [EPRINTS_ROOT]/archives/[ARCHIVEID]/cfg/static/javascript/?
>>> >
>>> >
>>> >
>>> >     Cheers,
>>> >
>>> >     John
>>> >
>>> >
>>> >
>>> >     *From:*eprints-tech-bounces at ecs.soton.ac.uk
>>> >     <mailto:eprints-tech-bounces at ecs.soton.ac.uk>
>>> >     [mailto:eprints-tech-bounces at ecs.soton.ac.uk
>>> >     <mailto:eprints-tech-bounces at ecs.soton.ac.uk>] *On Behalf Of
>>> >     *Mitocariu Emilian
>>> >     *Sent:* 27 September 2017 09:07
>>> >     *To:* eprints-tech at ecs.soton.ac.uk <mailto:eprints-tech at ecs.soton
>>> .ac.uk>
>>> >     *Subject:* [EP-tech] Black overlay covers half of the webpage
>>> >
>>> >
>>> >
>>> >     Hi,
>>> >
>>> >
>>> >
>>> >     I'm trying to migrate eprints from a server with ubuntu 10.04.4 and
>>> >     eprints 3.3.7 to a new server with ubuntu 16.04.03 and eprints
>>> >     3.3.15. I did the migration as described
>>> >     here: https://wiki.eprints.org/w/Moving_a_repository, but i also
>>> ran
>>> >     this command "./bin/epadmin update myrepo" after "./bin/epadmin
>>> >     upgrade myrepo".
>>> >
>>> >
>>> >
>>> >     I set up a temporary domain to test the migration and when I
>>> visited
>>> >     the webpage, about half of the page was black. I realised that the
>>> >     eprints configuration file (cfg/cfg.d/10_core.pl
>>> >     <http://10_core.pl>) still had the original domain set, not the
>>>
>>> >     temporary one, so I changed it with "./bin/epadmin
>>> >     config_core<archivename>", generated the new webpages and the black
>>> >     overlay disappeared.
>>> >
>>> >
>>> >
>>> >     The server is behind a proxy, so I generated a certificate on the
>>> >     proxy and enabled HTTPS. Now the black overlay reappeared and I
>>> >     can't get rid of it. I attached a print screen to this email for
>>> >     more details.
>>> >
>>> >
>>> >
>>> >     Does anyone know what causes the black overlay to appear and how
>>> can
>>> >     i get rid of it?
>>> >
>>> >
>>> >     *** Options:
>>> >     http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
>>> >     *** Archive: http://www.eprints.org/tech.php/
>>> >     *** EPrints community wiki: http://wiki.eprints.org/
>>> >     *** EPrints developers Forum: http://forum.eprints.org/
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > *** Options: http://mailman.ecs.soton.ac.uk
>>> /mailman/listinfo/eprints-tech
>>> > *** Archive: http://www.eprints.org/tech.php/
>>> > *** EPrints community wiki: http://wiki.eprints.org/
>>> > *** EPrints developers Forum: http://forum.eprints.org/
>>> >
>>>
>>> *** Options: http://mailman.ecs.soton.ac.uk
>>> /mailman/listinfo/eprints-tech
>>> *** Archive: http://www.eprints.org/tech.php/
>>> *** EPrints community wiki: http://wiki.eprints.org/
>>> *** EPrints developers Forum: http://forum.eprints.org/
>>>
>>>
>>>
>>>
>>>
>>> *** Options: http://mailman.ecs.soton.ac.uk
>>> /mailman/listinfo/eprints-tech
>>> *** Archive: http://www.eprints.org/tech.php/
>>> *** EPrints community wiki: http://wiki.eprints.org/
>>> *** EPrints developers Forum: http://forum.eprints.org/
>>>
>>>
>>
>> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
>> *** Archive: http://www.eprints.org/tech.php/
>> *** EPrints community wiki: http://wiki.eprints.org/
>> *** EPrints developers Forum: http://forum.eprints.org/
>>
>>
>
> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> *** Archive: http://www.eprints.org/tech.php/
> *** EPrints community wiki: http://wiki.eprints.org/
> *** EPrints developers Forum: http://forum.eprints.org/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20170928/efa84ba6/attachment-0001.html