Ticket #3027 (closed defect: fixed)
epc:pin bug if pin used twice
| Reported by: | tmb | Owned by: | |
|---|---|---|---|
| Priority: | unset | Milestone: | EPrints 3.0.5 |
| Component: | - | Version: | 3.0 |
| Severity: | normal | Keywords: | |
| Cc: |
Description (last modified by tdb01r) (diff)
Hi Chris,
there is a minor bug in the epc:pin handling routines. In perl_lib/Eprints/XML/EPC.pm, from line 177 the code is as follows:
my $retnode;
if( $params{pindata}->{used}->{$ref} || $node->hasChildNodes )
{
$retnode = EPrints::XML::clone_node(
$params{pindata}->{inserts}->{$ref}, 1 );
}
else
{
$retnode = $params{pindata}->{inserts}->{$ref};
$params{pindata}->{used}->{$ref} = 1;
}
if( $node->hasChildNodes )
{
$retnode->appendChild( process_child_nodes( $node, %params ) );
}
return $retnode;
Without the indicated change if the pindata has a child and reused, then second time the whole first data is replaced, not only the pin itself. As an example:
<table><tr><td><epc:pin name="link">FIRST</epc:pin></td>
<td><epc:pin name="link">SECOND</epc:pin></td></tr></table>
the generated text would be
<table><tr><td><a href="...">FIRST</a></td>
<td><a href="...">FIRSTSECOND</a></td></tr></table>
Reported by Lazlo Csirmaz laci@… on ep-tech
Change History
Note: See
TracTickets for help on using
tickets.
