Mailing List Archive

Bug in the admin-UI
Hi,

I found a bug in the Admin-UI that gave an 500 Internal Server Error
when downloading tables from the Table Manager (admin/gentable). PJ
suggested to add an Autoload to the catalog_afer.cfg, and this fixed the
problem.

I created a pull-request @github with a patch.

https://github.com/interchange/interchange/pull/105

René

_______________________________________________
interchange-users mailing list
interchange-users@icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users
Re: Bug in the admin-UI [ In reply to ]
On 04/12/16 22:10, René wrote:
> I found a bug in the Admin-UI that gave an 500 Internal Server Error
> when downloading tables from the Table Manager (admin/gentable). PJ
> suggested to add an Autoload to the catalog_afer.cfg, and this fixed the
> problem.
>
> I created a pull-request @github with a patch.
>
> https://github.com/interchange/interchange/pull/105

The AutoLoad is not necessarily what I would recommend for a permanent
fix. The issue is that the ui_download ActionMap makes a call to
$Tag->if_mm, which attempts to open the access table. Because it's
being run in a Safe container it can't do so unless the table is opened
ahead of time, which it isn't for the actionmap.

The AutoLoad is a bit of a sledgehammer approach because it pre-loads
the access table for every page, not just the ActionMap, but it does
confirm (and fix) the issue.

Other solutions would be to move the ActionMap to global code, or
rewrite it so that it pre-opens the table itself, possibly by using ITL
with a [perl access] tag instead of a sub.


Peter

_______________________________________________
interchange-users mailing list
interchange-users@icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users
Re: Bug in the admin-UI [ In reply to ]
On 12/04/2016 09:13 PM, Peter wrote:
> On 04/12/16 22:10, René wrote:
>> I found a bug in the Admin-UI that gave an 500 Internal Server Error
>> when downloading tables from the Table Manager (admin/gentable). PJ
>> suggested to add an Autoload to the catalog_afer.cfg, and this fixed the
>> problem.
>>
>> I created a pull-request @github with a patch.
>>
>> https://github.com/interchange/interchange/pull/105
>
> The AutoLoad is not necessarily what I would recommend for a permanent
> fix. The issue is that the ui_download ActionMap makes a call to
> $Tag->if_mm, which attempts to open the access table. Because it's
> being run in a Safe container it can't do so unless the table is opened
> ahead of time, which it isn't for the actionmap.
>
> The AutoLoad is a bit of a sledgehammer approach because it pre-loads
> the access table for every page, not just the ActionMap, but it does
> confirm (and fix) the issue.
>
> Other solutions would be to move the ActionMap to global code, or
> rewrite it so that it pre-opens the table itself, possibly by using ITL
> with a [perl access] tag instead of a sub.
>
>
> Peter

Also I strongly suggest to move this table into SQL instead of using
a text database.

Regards
Racke



--
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration.

_______________________________________________
interchange-users mailing list
interchange-users@icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users
Re: Bug in the admin-UI [ In reply to ]
On 05/12/16 21:27, Stefan Hornburg (Racke) wrote:
> Also I strongly suggest to move this table into SQL instead of using
> a text database.

I agree with that, but it won't solve the issue here.


Peter

_______________________________________________
interchange-users mailing list
interchange-users@icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users