Page 1 of 1

Beiträge richtig sortieren

Posted: 10 Nov 2015, 17:02
by thola
Hallo liebes Forum

Ich benötige nun wirklich eure Hilfe!!!!!

Seit nun knapp 4 Wochen versuche ich mit sämtlichen Methoden die alten Beiträge (vor der Migration) in die richtige Reihenfolge zu bringen (Datum absteigend). Ich habe dazu natürlich die Anleitung von reisefotografien.eu befolgt und sämtliche andere Methoden auf die man beim Googeln so stößt, jedoch mit nur mäßigem Erfolg.
Die migrierten Beiträge werden einfach nicht richtig nach Datum absteigend sortiert bzw. dann die neuen Beiträge (nach der Migration - Joomla 3) an vorderster Position gestellt.

Ich kann euch gerne den Export von (jos_phocaguestbook_items) aus der Datenbank von Joomla 2.5 zukommen lassen, damit Ihr euch selber überzeugen könnt.

Vielen Dank

Re: Beiträge richtig sortieren

Posted: 10 Nov 2015, 20:12
by christine
Hallo thola,

kann mich erinnern, da war ja so einiges .... :wink:

Dachten, das wäre schon erledigt, weil Du daraufhin nicht mehr geschrieben hast:
viewtopic.php?f=2&t=38034&start=20#p118369

Schau Dir bitte nochmals Jans' Infos an.

Liebe Grüße, Christine

Re: Beiträge richtig sortieren

Posted: 10 Nov 2015, 23:17
by zerofield
Tut mir leidt meiner Deutsch ist nicht so gut.
So I will stick to English :)
If I understand correctly you have issues getting J2.5 posts in the correct order. I did had same struggles and tracked down the issue. Just follow exact instructions as described in my final post in thread viewtopic.php?f=2&t=28568

Basically it comes down to following Jan's migration instructions (https://www.phoca.cz/development/50-joom ... omla-3)(at the end you will find special instructions for migration of phoca guestbook) with the very important change to set the rgt value of the ROOT row to the highest value already listed in the rgt column of your database.

Sorry if I misunderstood your problem but I hope this information helps.

Re: Beiträge richtig sortieren

Posted: 11 Nov 2015, 00:21
by christine
Hi,
Puhh where I'am now? Because have some threads 'open' about this matter and studied ..... :wink:

Hi christopher (zerofield) I think you mean this here:
@ thola in german: http://www.reisefotografien.eu/phoca-be ... ert-werden
Kategorie ID aktualisieren (fügen Sie die ID ein, die Sie als Gästebuch ID notiert haben):

UPDATE `jos_phocaguestbook_items` SET `catid` = '8';
UPDATE `jos_phocaguestbook_items` SET `catid` = '0' WHERE `id` = '1';
Fix:
Skip 8.2 and perform the following query after you have executed the final query UPDATE jos_phocaguestbook_items SET rgt= etc..
UPDATE `jos_phocaguestbook_items` SET `catid` = '0' WHERE `id`=`1`; Note, change the 1 at the end for the highest value you can find for rgt in the items database.
How can thola find the "highest value"? Of course in the db. Is it difficult? :wink:

@ thola: schaust Du mal bitte in Deiner Datenbank?

Mehr weiß ich jetzt nicht & hoffe, wir kommen der Sache jetzt näher :idea:
Liebe Grüße, Christine
----------------------------------------
Christopher: OT: bedankt voor jau uitvoering en we willen zien, ofdat het lukt. Maar dan in engels en ik dan in duits 8)

Re: Beiträge richtig sortieren

Posted: 11 Nov 2015, 18:28
by thola
Hello,

yes i have exactly this problem!! after checking the rgt. all new posts start again from rgt 2. and that’s the reason why new posts are not right sorted.

i tried it like this but it doesn’t work or chance anything

1) INSERT `jos_phocaguestbook_items` (id, catid, parent_id, lft, level, username, userid, email, homesite, ip, title, content, date, published, checked_out, checked_out_time) SELECT id+1 AS id, 10013 AS catid, 1 AS parent_id, ordering AS lft, 1 AS level, username, userid, email, homesite, ip, title, content, date, published, checked_out, checked_out_time FROM `jos_temp_phocaguestbook_items`
2) UPDATE `jos_phocaguestbook_items` SET `language` = '*';
3) UPDATE `jos_phocaguestbook_items` SET `catid` = '298'; - Guestbook Categorie
UPDATE `jos_phocaguestbook_items` SET `catid` = '0' WHERE `id` = '128'; - highest rgt in database
4) UPDATE jos_phocaguestbook_items SET rgt=(SELECT rgtnew FROM migrate WHERE migrate.id = jos_phocaguestbook_items.id);

???? or what should i skip ???

Thank you all for helping !!!!!!!

Re: Beiträge richtig sortieren

Posted: 11 Nov 2015, 19:54
by thola
now i´m close :P

jan made the right solution with
Hi, try to check the settings (options) in menu link to guestbook (if the ordering is not overriden by menu link).

The second problem which this can be:

Try to open:
components/com_phocaguestbook/models/guestbook.php
Change Line cca 305
from:
$order = $params->get('items_order', 'odering');
to:
$order = $params->get('items_orderby', 'date');

Try to change it and let me know, if there were some changes :idea:

Jan
now the ordering with the option in the backend -oder by date - is working right and all new post will be ordered in front :D

but the only thing which is not working is as "zerofield" wrote on the outher post - order option 'Manual(Date but can be changed by admin)'
when i use this option in the backend the new post will be not postet in front - the are then on the back again - the manuel chance of the date makes no difference