<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <p>Hi Thomas and Yuri,</p>
    <p>I think the following fix to line 1744 of
      /opt/eprints3/perl_lib/EPrints/DataObj/EPrint.pm for EPrints 3.4.2
      will resolve your main problem:</p>
    <p>if( <b>defined $parent &amp;&amp;</b> $parent-&gt;get_value(
      &quot;eprint_status&quot; ) eq &quot;archive&quot; )</p>
    <p>This is inside the code block for the in_thread function.&nbsp; It
      changes:</p>
    <p><font face="monospace">sub in_thread<br>
        {<br>
        &nbsp;&nbsp;&nbsp; my( $self, $field ) = @_;<br>
        <br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if( $self-&gt;later_in_thread( $field )-&gt;count &gt; 0
        )<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return 1;<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if( $self-&gt;is_set( $field-&gt;name ) )<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my $parentid = $self-&gt;get_value(
        $field-&gt;name );<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my $dataset = $self-&gt;{session}-&gt;dataset(
        &quot;eprint&quot; );<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my $parent = $dataset-&gt;dataobj( $parentid );<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if( $parent-&gt;get_value( &quot;eprint_status&quot; ) eq
        &quot;archive&quot; )<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return 1;<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
        }</font><br>
    </p>
    <p>To:</p>
    <p><font face="monospace">sub in_thread<br>
        {<br>
        &nbsp;&nbsp;&nbsp; my( $self, $field ) = @_;<br>
        <br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if( $self-&gt;later_in_thread( $field )-&gt;count &gt; 0
        )<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return 1;<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if( $self-&gt;is_set( $field-&gt;name ) )<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my $parentid = $self-&gt;get_value(
        $field-&gt;name );<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my $dataset = $self-&gt;{session}-&gt;dataset(
        &quot;eprint&quot; );<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my $parent = $dataset-&gt;dataobj( $parentid );<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if( defined $parent &amp;&amp;
        $parent-&gt;get_value( &quot;eprint_status&quot; ) eq &quot;archive&quot; )<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return 1;<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
        }</font><br>
      <br>
    </p>
    <div class="moz-cite-prefix">I further tested with deleting the
      middle item (151) of three items where:</div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix"> 152 -succeeds-&gt; 151 -succeeds-&gt;
      98</div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">This breaks the chain which means
      neither 152 nor 98 displays the &quot;Available Versions of this Item&quot;
      section on their abstract pages but the fix to try to tie the
      chain together back together felt like something overly complicate
      to implement and may deal with this case but might break in other
      scenarios yet to be considered.&nbsp; So as deletion of 151 does not
      leave anything horribly broken with the fix I have introduced in
      3.4.3, I thought it best to leave this along.&nbsp; In combination with
      the improvement to prevent previously live items from being fully
      deleted, the chances of this breaking horribly in future is much
      more limited.&nbsp; Although retiring 151 as opposed to completely
      deleting it, will have the same effect on the &quot;Available Versions
      of this Item&quot; sections for 152 and 98.</div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">Regards</div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">David Newman<br>
    </div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">On 19/05/2022 14:02, Yuri Carrer via
      Eprints-tech wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:ec0b804d-744d-d2b6-618c-96c1b846f1f6@unipd.it">
      <pre class="moz-quote-pre" wrap="">CAUTION: This e-mail originated outside the University of Southampton.

Isn't the reverse? I mean the missing eprint has the succeeds field that
points to an existing eprint.

Thomas: I've found a solution. Go to:

/cgi/users/home?screen=Listing&amp;dataset=eprint (Manage records on the top
bar -&gt; Eprints)

and search the id of the record deleted or with problems. Then destroy
it (the dust bin) and then regenerate the abstracts, the link to the
missing one is gone.

If you don't even have it in records, you've to go with the db.

Mine was an Eprints 3.1.X and I didn't had the manage records.

I think that using the db in this situation is easier because the
succeeds is just a field and there should be any problem changing it (it
is not indexed or used elsewhere).

Il 19/05/22 13:04, David R Newman ha scritto:
</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">the succeeding eprint still has its succeeds field set with a now
missing eprint ID
</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">
--
Yuri Carrer

  CAB - Centro di Ateneo per le Biblioteche, Universit√† di Padova
  Tel: 049/827 9712 - Via Beato Pellegrino, 28 - Padova


*** Options: <a class="moz-txt-link-freetext" href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a>
*** Archive: <a class="moz-txt-link-freetext" href="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C0fcf4ca49f6c431c5af508da39a073ff%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637885658536799953%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=OrTD0HVBSmZ%2FS6wBCWWF4g435dLSTitmOHFMMgC%2FM98%3D&amp;reserved=0" originalSrc="http://www.eprints.org/tech.php/" shash="OFavVsbuHAzRr8yJDPsk7pyEZYqeZOSQL9ZfOJqLRksiHTy/OZ+8L1yxIN+5R73eOsnZFjyXDmnGhXBQL+6bHHdIJ4EJ9UjLfsKMCHCS3awWSGHrCs11BhXOyVmKcOnonPCmw+D+SbDqeS0MZ3FvyD3ioFJA2j3rww0v056z188=">https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;amp;data=05%7C01%7Cdrn%40ecs.soton.ac.uk%7C4da334d05e424da61e9808da3997ef0d%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637885621960444360%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=wiAoVRjoRwTOe4Hbe51Ti3lV%2F5GCUaPenmhRZ3pVX7Q%3D&amp;amp;reserved=0</a>
*** EPrints community wiki: <a class="moz-txt-link-freetext" href="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C0fcf4ca49f6c431c5af508da39a073ff%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637885658536799953%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=%2BsBueSlmLKauzNa%2B1naJfLqq%2FA88NL0k%2Fryh6149BDQ%3D&amp;reserved=0" originalSrc="http://wiki.eprints.org/" shash="YrMeUpxAHOi3r8//pE19cObEt/gvlEvyK3mqA/S3rdvkv68qFH5/XH88cZ+cCPZpMgV0Ya2omLbZ0NJ2KXiD59UahVr+uhP+oalQoJlN8d+rlCOF71fUrFu4mbkmXb0w7leHQvqvQPIqj3dFSFnCMqMyP2/afOn/pRPg63AldiE=">https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;amp;data=05%7C01%7Cdrn%40ecs.soton.ac.uk%7C4da334d05e424da61e9808da3997ef0d%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637885621960444360%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=ngmhyXkuNRWOLN6vPnMbcAPIf7qnZnUnsRCjEwUoNZc%3D&amp;amp;reserved=0</a></pre>
    </blockquote>
  </body>
</html>