<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://pkp.sfu.ca/bugzilla/bugzilla.dtd">

<bugzilla version="4.2.5+"
          urlbase="http://pkp.sfu.ca/bugzilla/"
          
          maintainer="pkp-hosted@sfu.ca"
>

    <bug>
          <bug_id>4554</bug_id>
          
          <creation_ts>2009-07-27 19:44:00 -0700</creation_ts>
          <short_desc>Cannot re-order some sections</short_desc>
          <delta_ts>2013-01-25 10:57:33 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>OJS</product>
          <component>Editors</component>
          <version>2.3</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://journals.sfu.ca/cshp/index.php/cjhp/editor/issueToc/7</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Kevin Stranack">kstranac</reporter>
          <assigned_to name="PKP Support">pkp-support</assigned_to>
          <cc>alec</cc>
    
    <cc>justin.gonder</cc>
    
    <cc>mattcrider</cc>
          
          

      

      

      

          <long_desc isprivate="0">
            <commentid>15965</commentid>
            <who name="Kevin Stranack">kstranac</who>
            <bug_when>2009-07-27 19:44:36 -0700</bug_when>
            <thetext>When trying to re-order sections up or down the TOC, some will not move as expected. For example, the linked UP arrow for &quot;Report From The Presidential Team&quot; has no effect:

http://journals.sfu.ca/cshp/index.php/cjhp/editor/moveSectionToc/7?d=u&amp;newPos=16&amp;sectionId=26

Also, the DOWN arrow for the &quot;Index&quot; section just above the &quot;Report From the Presidential Team&quot; section is not linked at all, providing no way to move this section down the TOC.

Similar problems can be found in the following issues for this SFU-hosted journal:

Vol 53 #5
Vol 54 #4
Vol 55 #5
Vol 56 #5
Vol 57 #5
Vol 58 #5
Vol 60 #5
Vol 61 #6

If this can be patched, could it be applied to this journal?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <commentid>15976</commentid>
            <who name="Matthew Crider">mattcrider</who>
            <bug_when>2009-07-28 16:11:00 -0700</bug_when>
            <thetext>Kevin, do you know what steps they took to cause this?  I reproduced the behavior once, but I can&apos;t for the life of me do it again.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <commentid>15979</commentid>
            <who name="Kevin Stranack">kstranac</who>
            <bug_when>2009-07-29 08:11:14 -0700</bug_when>
            <thetext>No, but I will ask them and cc you on the message.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <commentid>15980</commentid>
            <who name="Alec Smecher">alec</who>
            <bug_when>2009-07-29 08:44:45 -0700</bug_when>
            <thetext>The most probable cause, OTOH, is something like an article being published to an issue in a section that wasn&apos;t previously part of the ToC. That&apos;s enough of a special case that it may not currently be handled properly.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <commentid>15982</commentid>
            <who name="Matthew Crider">mattcrider</who>
            <bug_when>2009-07-29 10:44:25 -0700</bug_when>
            <thetext>No, its not quite as simple as that..  It seems to be a very special case, and I reproduced it once (actually, I had about 10 sections in one issue and about 8 of them didn&apos;t have links on the &apos;up&apos; arrows)... But in trying to debug the problem I unset the custom ordering and have no idea how to reproduce the error!  This heat wave might have made me stupid though.

I did have the $sections array in pages/editor/IssueManagementHandler.inc.php printed out when the bug occurred though, and I noticed that $section[4] and sometimes $sections[5] was null for these sections in question, so its a handler and not a template problem.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <commentid>16401</commentid>
            <who name="Alec Smecher">alec</who>
            <bug_when>2009-08-20 10:01:59 -0700</bug_when>
            <thetext>Matt, did you get any further on this one?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <commentid>16402</commentid>
            <who name="Matthew Crider">mattcrider</who>
            <bug_when>2009-08-20 10:04:27 -0700</bug_when>
            <thetext>No -- I spent so much time trying to reproduce this!  Would you be able to take a look?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <commentid>16404</commentid>
            <who name="Alec Smecher">alec</who>
            <bug_when>2009-08-20 10:25:27 -0700</bug_when>
            <thetext>Can I set you up with a DB dump from CHSP? It can be duplicated there.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <commentid>16405</commentid>
            <who name="Matthew Crider">mattcrider</who>
            <bug_when>2009-08-20 10:33:10 -0700</bug_when>
            <thetext>Sure, or I can take one down myself (Though I can&apos;t find them on lib-journals2 or 3)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <commentid>16408</commentid>
            <who name="Alec Smecher">alec</who>
            <bug_when>2009-08-20 10:38:27 -0700</bug_when>
            <thetext>Matt, it&apos;s on lib-journals2 -- my typo, the install is called cshp (not chsp). See the URL above.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <commentid>16457</commentid>
              <attachid>2327</attachid>
            <who name="Matthew Crider">mattcrider</who>
            <bug_when>2009-08-21 18:05:33 -0700</bug_when>
            <thetext>Created attachment 2327
Patch against OJS pre-2.3 CVS

Well, the reason this is occurring is because the custom_section_orders table is not being consistently maintained.  For instance in volum 61, no 5 of CSHP, there is a section 26 (Report From The Presidential Team) that never doesn&apos;t exist in the custom_section_orders table, so the issue management handler thinks section 8 (News) is the last section and doesn&apos;t provide a down arrow link.  

I still can&apos;t really reproduce the problem, but I think it has something to do with the fact that when you delete an article that is the only article in the section, the section is not deleted from the custom_section_orders table.  This patch fixes this bug.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <commentid>16461</commentid>
            <who name="Matthew Crider">mattcrider</who>
            <bug_when>2009-08-21 18:10:25 -0700</bug_when>
            <thetext>Patch committed.  Though I can&apos;t reproduce the problem and see if the patch actually fixes it, I think this is the only way the custom_section_orders table can get messed up.  Also, the problem is very hard to reproduce.  So I&apos;m gonna mark this as closed :)</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>2327</attachid>
            <date>2009-08-21 18:05:00 -0700</date>
            <delta_ts>2009-08-21 18:05:33 -0700</delta_ts>
            <desc>Patch against OJS pre-2.3 CVS</desc>
            <filename>ojsSectionOrdering.patch</filename>
            <type>text/plain</type>
            <size>2488</size>
            <attacher>mattcrider</attacher>
            
              <data encoding="base64">SW5kZXg6IGNsYXNzZXMvam91cm5hbC9TZWN0aW9uREFPLmluYy5waHAKPT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQpSQ1Mg
ZmlsZTogL2N2cy9vanMyL2NsYXNzZXMvam91cm5hbC9TZWN0aW9uREFPLmluYy5waHAsdgpyZXRy
aWV2aW5nIHJldmlzaW9uIDEuNTYKZGlmZiAtdSAtcjEuNTYgU2VjdGlvbkRBTy5pbmMucGhwCi0t
LSBjbGFzc2VzL2pvdXJuYWwvU2VjdGlvbkRBTy5pbmMucGhwCTI4IEp1bCAyMDA5IDE4OjEyOjQ2
IC0wMDAwCTEuNTYKKysrIGNsYXNzZXMvam91cm5hbC9TZWN0aW9uREFPLmluYy5waHAJMjIgQXVn
IDIwMDkgMDE6MDI6MzQgLTAwMDAKQEAgLTQ0MSw2ICs0NDEsMjQgQEAKIAkJCSdERUxFVEUgRlJP
TSBjdXN0b21fc2VjdGlvbl9vcmRlcnMgV0hFUkUgaXNzdWVfaWQgPSA/JywgJGlzc3VlSWQKIAkJ
KTsKIAl9CisJCisJLyoqCisJICogRGVsZXRlIGEgc2VjdGlvbiBmcm9tIHRoZSBjdXN0b20gc2Vj
dGlvbiBvcmRlciB0YWJsZS4KKwkgKiBAcGFyYW0gJGlzc3VlSWQgaW50CisJICogQHBhcmFtICRz
ZWN0aW9uSWQgaW50CSAKKwkgKi8KKwlmdW5jdGlvbiBkZWxldGVDdXN0b21TZWN0aW9uKCRpc3N1
ZUlkLCAkc2VjdGlvbklkKSB7CisJCSRzZXF1ZW5jZSA9ICR0aGlzLT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