Regenerating URIs

Discuss PivotX 2.0.x here. Non-PivotX related discussions go in The Drain.

Regenerating URIs

Postby kangoo » Mon Oct 11, 2010 10:15 pm

When I upgraded from Pivot 1.4 to PivotX 2.1. and converted entries to the new format, entries' URIs were generated in a way that ignores non-asii characters that were in the titles of entries. So such letters as ā, é or ö disappeared from words in links. Current version of PivotX has better approach to those characters -- instead of dropping them, it uses their ascii equivalent.

But URIs of previous entries are already generated by the previous algorithm and seems that they will remain in this form also in the future. Is there a way to regenerate URIs anew so that letters are not omitted from links any more -- besides updating every single entry by hand?
kangoo
 
Posts: 32
Joined: Wed Jun 25, 2008 7:46 pm

Re: Regenerating URIs

Postby hansfn » Tue Oct 12, 2010 6:55 am

1) How did you convert the entries?
2) What database type are you using?
hansfn
Developer
 
Posts: 3282
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Regenerating URIs

Postby kangoo » Tue Oct 12, 2010 9:36 am

1) I used import_pivot.php script;
2) Flat files.
kangoo
 
Posts: 32
Joined: Wed Jun 25, 2008 7:46 pm

Re: Regenerating URIs

Postby hansfn » Tue Oct 12, 2010 9:50 am

OK.

Have your regenerated the index after the import - pivotx/index.php?page=buildindex That should create the proper URIs for each entry.
hansfn
Developer
 
Posts: 3282
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Regenerating URIs

Postby kangoo » Wed Oct 13, 2010 2:40 pm

It doesn't seem to work that way. I even deleted index-standard-xxx.php and ser-uris.php files, where URIs are stored, and then rebuilt DB, but the result is the same: still letters are missing from links.
kangoo
 
Posts: 32
Joined: Wed Jun 25, 2008 7:46 pm

Re: Regenerating URIs

Postby hansfn » Wed Oct 13, 2010 5:27 pm

The URI should be stored in the entries themselves - select "Edit" for one of the entries on pivotx/index.php?page=fileexplore&additionalpath=standard-00000 Does it contain the "uri" key?

NB! Which letters are you missing? PivotX doesn't handle all characters when converting to us-ascii ... What is the entry title and uri for an entry that is missing some characters?

PS! Do you have a link to your site?
hansfn
Developer
 
Posts: 3282
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Regenerating URIs

Postby kangoo » Thu Oct 14, 2010 11:56 am

Yes, the entries themselves contain an URI key.

Omitted are Latvian diacritical signs -- ā ē ī ū ŗ ļ ķ ņ ģ š ž č. When I write new entries, they are correctly converted to ascii characters, but with entries that have been created with Pivot 1.4, entry with title "Auksāk nekā mēness" has URI "aukstk-nek-mness".
Last edited by kangoo on Mon Mar 21, 2011 10:04 pm, edited 2 times in total.
kangoo
 
Posts: 32
Joined: Wed Jun 25, 2008 7:46 pm

Re: Regenerating URIs

Postby hansfn » Thu Oct 14, 2010 11:17 pm

Do you have your old Pivot db folder so I can try to reproduce this? This is one of those "it-can't-happen" problems. (I'll leave out the technical details.) Can you also send me your file db/standard-01000/01077.php? Did you upgrade directly from 1.40.x to 2.1.2? Did you select "Convert entries from ISO-8859-1 to UTF-8" when importing or where you already using UTF-8? Sorry about all the questions. Contact me at hansfn@pivtox.net (or hansfn@gmail.com).

PS! It's not hard to create a small PHP script that regenerates all the URIs - I just want to fix this bug first (if there is one).
hansfn
Developer
 
Posts: 3282
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway


Return to 2.x Discussion

Who is online

Users browsing this forum: No registered users and 2 guests

cron