Problem with sorting articles and structure items
-
Pixelchaos
- Posts: 17
- Joined: Wed 25. Aug 2004, 14:04
- Contact:
Problem with sorting articles and structure items
Hi,
I'm using phpwcms for almost two years now on a fairly big website. It's got about 250 pages and 70 structure items. At the moment I'm running 1.2.5DEV.
The problem is with sorting the articles and structure items. It started with non-admins not being able to move articles or conent parts up or down in a list. Now even as an admin I can't do it. Same goes for the structure items. They move, but totally unpredictable. If I click the small arrow "up" 10 times the structure item goes down 5 times and then up 1 time.
Is there a solution for this problem? Or is my website too big for PHPwcms?
I'm using phpwcms for almost two years now on a fairly big website. It's got about 250 pages and 70 structure items. At the moment I'm running 1.2.5DEV.
The problem is with sorting the articles and structure items. It started with non-admins not being able to move articles or conent parts up or down in a list. Now even as an admin I can't do it. Same goes for the structure items. They move, but totally unpredictable. If I click the small arrow "up" 10 times the structure item goes down 5 times and then up 1 time.
Is there a solution for this problem? Or is my website too big for PHPwcms?
Samething here
Wish we can find the problem...
Pretty hard to find this gremlin
Wish we can find the problem...
Pretty hard to find this gremlin

PhpWCMS Evangelist, -- iRoutier.com Running phpWCMS 1.4.2, r354 -> Great Version!!!!
Customers are back again on me with:
Do you have a solution for this bug?
This is getting pretty annoying

Do you have a solution for this bug?
This is getting pretty annoying

PhpWCMS Evangelist, -- iRoutier.com Running phpWCMS 1.4.2, r354 -> Great Version!!!!
Hi DeXXus
I mean: 'any "single" click does not ALWAYS produce the correct movement' + on long lists of content parts, then the ones at the bottom get stucked there without the possibility to move them up or down. Also I heard about unpredictable movements (using arrows). I myself seen this behavior but in Admin menu, not in content parts listings.
I mean: 'any "single" click does not ALWAYS produce the correct movement' + on long lists of content parts, then the ones at the bottom get stucked there without the possibility to move them up or down. Also I heard about unpredictable movements (using arrows). I myself seen this behavior but in Admin menu, not in content parts listings.
Cheers,DeXXus wrote:Does this mean that any "single" click does not ALWAYS produce the correct direction of movement?
Or only clicks in "rapid" fashion cause improper movements?

PhpWCMS Evangelist, -- iRoutier.com Running phpWCMS 1.4.2, r354 -> Great Version!!!!
Looks like the author of the javascript corrected a bug:
Download and replace the "original" with the updated file HERE and give it a go!
http://www.mattkruse.com/javascript/sel ... ource.html
Download and replace the "original" with the updated file HERE and give it a go!
http://www.mattkruse.com/javascript/sel ... ource.html
// HISTORY
// ------------------------------------------------------------------
// April 20, 2005: Fixed the removeSelectedOptions() function to
// correctly handle single selects
// June 12, 2003: Modified up and down functions to support more than
// one selected option
/*
Thank you DeXXus for that reasearch
Could have had worked but... I gave it a try by swapping my customer's Java Script file: include\inc_js\selectbox.js
with the one at the link you kindly provided me... still... no success.
Same issue. Won't move Up or Down when in article information
detailed content parts listing as opposed to the Article menu: simple content parts listing +
Where in the world did you found this updated Java Script?
Cheers,
Could have had worked but... I gave it a try by swapping my customer's Java Script file: include\inc_js\selectbox.js
with the one at the link you kindly provided me... still... no success.
Same issue. Won't move Up or Down when in article information
detailed content parts listing as opposed to the Article menu: simple content parts listing +
Where in the world did you found this updated Java Script?
Cheers,

PhpWCMS Evangelist, -- iRoutier.com Running phpWCMS 1.4.2, r354 -> Great Version!!!!
I was looking in the wrong place... OBVIOUSLY...LOL!StudioZ wrote:Where in the world did you found this updated Java Script?![]()
![]()
Cheers,
I just came across function calls to moveOptionUp and hunted down the .js file on a "wild goose" chase (musta been Canadian geese.
Another "wild guess" is...
It's probably related to the same problem where content parts have the symptom of not showing "preview" snippet in article information screens. Among other people, you reported it here:
http://www.phpwcms.de/forum/viewtopic.php?t=9728
Last edited by DeXXus on Fri 14. Apr 2006, 06:14, edited 1 time in total.
hey DeXXus shock:
I found this part in file:
include\inc_tmpl\articlecontent.list.tmpl.php
I have the feeling that the Crux of the Biscut -- F.Z. is right there...
Starting at line 174:
Cheers,
I found this part in file:
include\inc_tmpl\articlecontent.list.tmpl.php
I have the feeling that the Crux of the Biscut -- F.Z. is right there...
Starting at line 174:
Code: Select all
if($sc) {
//Jetzt aufbauen der Sortieranweisung
foreach($sbutton as $key => $value) {
if($key == 1) {
// if 1st content part in list
$sbutton[$key]["top"] = "<img src=\"img/button/sort_top_0.gif\" border=\"0\">";
} elseif(isset($sbutton[$key-1]["block"]) && $sbutton[$key-1]["block"] != $sbutton[$key]["block"]) {
// if this content part is selected for different block than previous
$sbutton[$key]["top"] = "<img src=\"img/button/sort_top_0.gif\" border=\"0\">";
} else {
$sbutton[$key]["top"] = "<a href=\"include/inc_act/act_articlecontent.php?sort=".
$sbutton[$key]["id"].":".$sbutton[$key-1]["sort"]."|".
$sbutton[$key-1]["id"].":".$sbutton[$key]["sort"].
"\" title=\"".$BL['be_article_cnt_up']."\"><img src=\"img/button/sort_top_1.gif\" border=\"0\"></a>";
}
if($key == $sc) {
// if this is the last content part in list
$sbutton[$key]["bottom"] = "<img src=\"img/button/sort_bottom_0.gif\" border=\"0\">";
} elseif(isset($sbutton[$key+1]["block"]) && $sbutton[$key+1]["block"] != $sbutton[$key]["block"]) {
// if this is the last content part in current block and next is different
$sbutton[$key]["bottom"] = "<img src=\"img/button/sort_bottom_0.gif\" border=\"0\">";
} else {
$sbutton[$key]["bottom"] = "<a href=\"include/inc_act/act_articlecontent.php?sort=".
$sbutton[$key]["id"].":".$sbutton[$key+1]["sort"]."|".
$sbutton[$key+1]["id"].":".$sbutton[$key]["sort"].
"\" title=\"".$BL['be_article_cnt_down']."\"><img src=\"img/button/sort_bottom_1.gif\" border=\"0\"></a>";
}
$sbutton_string[$sbutton[$key]["id"]] = $sbutton[$key]["top"].
"<img src=\"img/leer.gif\" width=\"1\" height=\"1\">".
$sbutton[$key]["bottom"];
}
unset($sbutton);
}
PhpWCMS Evangelist, -- iRoutier.com Running phpWCMS 1.4.2, r354 -> Great Version!!!!
well... I guess there's only Oliver to fix this for us....
Must only be a typo somewhere I can't find...
Must only be a typo somewhere I can't find...

PhpWCMS Evangelist, -- iRoutier.com Running phpWCMS 1.4.2, r354 -> Great Version!!!!
- Oliver Georgi
- Site Admin
- Posts: 9938
- Joined: Fri 3. Oct 2003, 22:22
- Location: Dessau-Roßlau
- Contact:
I think has nothing to do with typo. The problem might be how the sorting is done. And seems very problematic for all articles and content part created by copy/paste. And also when sorting of articles is not possible for users - check sorting setup in structure editor under admin. Only manual will allow sorting for articles.
I'm willing to edit sorting in another way - what I always tried was to handle all such sorting stuff with minimized SQL queries. But maybe this is not neccessary anymore because all have fast servers.
I will check how to optimize that part of code.
What never help is replacing JS code because this all is done in PHP.
Oliver
I'm willing to edit sorting in another way - what I always tried was to handle all such sorting stuff with minimized SQL queries. But maybe this is not neccessary anymore because all have fast servers.
I will check how to optimize that part of code.
What never help is replacing JS code because this all is done in PHP.
Oliver
Hi Oliver 
If it can help you...
The place (article information) where I have this problem, the section is set to manual sorting.
Thanks for dropping in,
If it can help you...
The place (article information) where I have this problem, the section is set to manual sorting.
Thanks for dropping in,

PhpWCMS Evangelist, -- iRoutier.com Running phpWCMS 1.4.2, r354 -> Great Version!!!!