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

[EP-tech] Strange button behaviour



Hi Yuri,
If I've understood this correctly, the 'screen' parameter that appears in the form value is the current screen (EPrint::View, or Admin), rather than the Screen that should be doing the processing.

Does the tab that contains the 'broken' button get loaded via AJAX, or is it rendered as part of the page?
Is this behaviour the same on both live and dev servers?

The rendering is done by EPrints::Plugin::Screen::_render_action_aux
The lists of actions/screens are cached here:
  EPrints::ScreenProcessor::cache_list_items, 
and retrieved here: 
  EPrints::ScreenProcessor::list_items

Have you got any code that is doing anything in those modules?

It could also be something in the tab rendering:
EPrints::XHTML::tabs
- look at the base_url 

I know none of that is actually an answer - but it might help narrow down what's causing the issue.

Cheers,
John

-----Original Message-----
From: eprints-tech-bounces at ecs.soton.ac.uk [mailto:eprints-tech-bounces at ecs.soton.ac.uk] On Behalf Of Yuri via Eprints-tech
Sent: 26 August 2019 12:38
To: eprints-tech at ecs.soton.ac.uk
Subject: Re: [EP-tech] Strange button behaviour

ping

Il 09/07/19 14:21, Yuri via Eprints-tech ha scritto:
> Any idea? It happens also for buttons like "Move to review" in
> cgi/users/home?screen=EPrint::View&eprintid=XXX. I have
>
> <form method="post" accept-charset="utf-8" action="/cgi/users/home"
> enctype="multipart/form-data">
>   ?<input name="screen" id="screen" value="EPrint::View" type="hidden">
> <- here it should point to the EPrint::Move, not EPrint::View!
> <input name="eprintid" id="eprintid" value="72" type="hidden">
> <input class="ep_form_action_button" value="Move to Review"
> name="_action_move_buffer" type="submit">
> </form>
>
> Luckly, the buttons under Actions are correct:
>
> <form method="post" accept-charset="utf-8" action="/cgi/users/home"
> enctype="multipart/form-data">
>   ?<input name="screen" id="screen" value="EPrint::Move" type="hidden">
> <- EPrint::Move, correct!
>   ?<input name="eprintid" id="eprintid" value="72" type="hidden">
>   ?<input class="ep_form_action_button" name="_action_move_buffer"
> value="Move to Review" type="submit">
> </form>
>
> Il 27/06/19 10:02, Yuri via Eprints-tech ha scritto:
>> Hi!
>>
>>    ?I've 2 almost identical Eprints installation, one for production and
>> one for testing. I'm very conservative in changing something in
>> production, more free in testing.
>>
>> Yesterday I've found that the Search Items button (Admin panel ->
>> Editorial tools) redirect to the same page. In testing it works and the
>> html form is correct:
>>
>> <form method="get" accept-charset="utf-8" action="/cgi/users/home">
>>    ? <input name="screen" id="screen" value="Staff::EPrintSearch"
>> type="hidden">
>>    ? <input value="Search items" class="ep_form_action_button" type="submit">
>> </form>
>>
>> while in production I've:
>>
>> <form method="get" accept-charset="utf-8" action="/cgi/users/home">
>>    ? <input name="screen" id="screen" value="Admin" type="hidden">
>>    ? <input class="ep_form_action_button" value="Search items" type="submit">
>> </form>
>>
>> As you can see, the production have "Admin" (the name of the main
>> plugin) as hidden value instead of Staff::EPrintSearch. Where can I
>> check this wrong behaviour? I've found the various plugin code, for
>> example Admin prints "actions" in button but I still have to find how
>> the "Admin" came out instead of "Staff::EPrintSearch".
>>
>> Latest modification has been only on javascript and abstract rendering,
>> seems unrelated to this problem.
>>
>> Thanks for any hint/help.
>>
>>
>> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
>> *** Archive: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cde5dfbebf96f4c185c5a08d72bc74b4b%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=2odqvPWYaAo94%2BKzuGMc1hiENoebXVxsxSlfr6K4HOE%3D&amp;reserved=0
>> *** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cde5dfbebf96f4c185c5a08d72bc74b4b%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=EXkGxTcbanne0Ph9L%2Bj3jFFn2ir5HemmEq7EoQz1LSk%3D&amp;reserved=0
>> *** EPrints developers Forum: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fforum.eprints.org%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cde5dfbebf96f4c185c5a08d72bc74b4b%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=NnrA9ypgA2Jf1n3jnONW628I9IZrRWG8FmeeWfN0gXs%3D&amp;reserved=0
> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> *** Archive: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cde5dfbebf96f4c185c5a08d72bc74b4b%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=2odqvPWYaAo94%2BKzuGMc1hiENoebXVxsxSlfr6K4HOE%3D&amp;reserved=0
> *** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cde5dfbebf96f4c185c5a08d72bc74b4b%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=EXkGxTcbanne0Ph9L%2Bj3jFFn2ir5HemmEq7EoQz1LSk%3D&amp;reserved=0
> *** EPrints developers Forum: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fforum.eprints.org%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cde5dfbebf96f4c185c5a08d72bc74b4b%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=NnrA9ypgA2Jf1n3jnONW628I9IZrRWG8FmeeWfN0gXs%3D&amp;reserved=0

*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cde5dfbebf96f4c185c5a08d72bc74b4b%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=2odqvPWYaAo94%2BKzuGMc1hiENoebXVxsxSlfr6K4HOE%3D&amp;reserved=0
*** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cde5dfbebf96f4c185c5a08d72bc74b4b%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=EXkGxTcbanne0Ph9L%2Bj3jFFn2ir5HemmEq7EoQz1LSk%3D&amp;reserved=0
*** EPrints developers Forum: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fforum.eprints.org%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cde5dfbebf96f4c185c5a08d72bc74b4b%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=NnrA9ypgA2Jf1n3jnONW628I9IZrRWG8FmeeWfN0gXs%3D&amp;reserved=0