Ticket #3027 (closed defect: fixed)

Opened 8 years ago

Last modified 8 years ago

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:

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 );
                $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

Changed 8 years ago by tdb01r

  • milestone changed from EPrints 3.1 beta to EPrints 3.0.4

Changed 8 years ago by tdb01r

  • status changed from new to closed
  • version set to 3.0
  • resolution set to fixed
  • description modified (diff)
  • milestone changed from EPrints 3.0.x (bugs go here) to EPrints 3.0.5

Resolved in r3240.

Note: See TracTickets for help on using tickets.