-
Posts
70 -
Joined
-
Last visited
Profile Information
-
Gender
Male
-
Location
Cologne, Germany
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
sebibu's Achievements
Full Member (4/6)
24
Reputation
-
(While the Pages::saveReady-hook is placed in ready.php ...) 1. I click on the save button on the page with pagetitle "Foo!" ich muss los 2. I fire the API $p->save() via TracyDebugger's console and save the page with pagetitle "Foo!" ich muss los. And get a wrong pagename with quot in it where " has been.
-
What could be the reason generated pagenames via my Pages::saveReady-hook that are initiated by hand over the Processwire backend with a " in the title differs from this fired in TracyDebugger's console via API $p->save(); like this: foreach($pages->find("template!=admin, has_parent!=2, include=all") as $p) { $p->save(); echo "Page {$page->title} (#$p) updated to {$p->name}<br>"; } E.g. Title: "Foo!" ich muss los Pagename via backend: 2025-01-10-foo-ich-muss-los ✓ Pagename via API: 2025-01-10-quot-foo-quot-ich-muss-los ✗ I would expect this to be the same result. Any ideas?
-
How to renew / regenerate pagenames for all pages?
sebibu replied to sebibu's topic in General Support
Thanks @bernhard! After shutting down the pc yesterday I got the cause. All pages without news template do not have a saveReady-hook. So for renewing pagenames on pages with other templates I simply have to temporarily create a new hook to set the pagename for other templates, too. Without the prepended news-published-day. Seems to work!☺️🙏🙋♂️ -
How to renew / regenerate pagenames for all pages?
sebibu replied to sebibu's topic in General Support
A very good hint to use TracyDebugger's console for that, @bernhard! Unfortunately in my tests the pagename is not renewed (or new set if empty) out of the pagetitle! foreach($pages->find("template!=admin, has_parent!=2, include=all") as $p) { $p->save(); echo "Page {$page->title} (#$p) updated to {$p->name}<br>"; } Any idea?👋 -
sebibu started following How to renew / regenerate pagenames for all pages?
-
I discovered a bug in the pagename generation, see here: https://processwire.com/talk/topic/30444-prepend-date-in-page-name-by-hook-creates-improper-results-on-some-existing-pages/ If there is a final fix, I need to renew / regenerate pagenames out of all pagetitles for all pages of a website. How would you do this? Is there a GUI-way? Or via API with a foreach? With the help of RockMigrations? One pinch: All news pagenames should still be prepended with my hook listed in the forum topic above. Thanks in advance!
-
😅👍 I created a bug ticket for this: https://github.com/processwire/processwire-issues/issues/2015
-
Thanks for testing, @poljpocket! Interesting. Consistent inconsistent at least!😉 Yes, I discovered the punycode in the ascii-only name column. But you are right, this seems to be non-standard when I compare it with e.g. with the results from punycoder.com (Punycode converter IDN converter). I wonder whether the conversion to punycode is still appropriate at all!?
-
I tested a lot the last days also with fresh latest stable installs with blank site profile local in DDEV and on the server. Exported, changed the charset and reimported the database from utf8mb3 to utf8mb4. Now the german special character äöü work, but strangely enough not always!😳🤔 ✓ Die Kölner „Miteinander“ → die-kölner-miteinander ✗ Köln gegen Köln in Köln mit allen Köln Fans – die Kölner „Miteinander“ → köln-gegen-kln-in-kln-mit-allen-köln-fans-die-kölner-miteinander (two missing ö) Furthermore: ✗ Fuß → s (?? should be fuß) ✗ Füße → füsse (should be füße) I thought PageNameTranslate is not used when using $config->pageNameCharset = 'UTF8'; and ß is in the whitelist!? @poljpocket and other: Are you so kind and test if this pagetitles generate the same pagenames in your instances? Thanks a lot!🙏👋
-
Only one which is only for pages with one determined template. But the problem occurs for pages with all templates and even if the hook is disabled. The newest stable one 3.0.229 All modules up to date.😇 BTW.. PHP mbstring extension is enabled.
-
Thanks for testing, @poljpocket! Great to see that it is basically working. Testing with a fresh install would have been my next step to narrow it down.👍 Interesting. I see you are using in your .htaccess RewriteCond %{REQUEST_URI} "^/~?[-_/a-zA-Z0-9äöüß.+!*'(),] instead of RewriteCond %{REQUEST_URI} "^/~?[-_/a-zA-Z0-9äöüß.+!*'(),]*$" So *$" is missing, which is necessary only for resolving the page request. Not build the pagename. 👋
-
Hi @poljpocket, thanks for taking the time! By default PageNameTranslate with this rules is used, that‘s right. But I‘m using the Extended Page Name Feature for UTF-8 support. Then this rules are hidden and not used. Please see here: https://processwire.com/blog/posts/page-name-charset-utf8/
-
Unfortunately I have to come back to my still existing pagename problem. This does not have anything to do with the hook. In general the pagename is shown correct in the preview before saving: But after saving special characters are removed: What am I doing wrong? I'm using this Extended Page Names feature: https://processwire.com/blog/posts/page-name-charset-utf8/ site/config.php: $config->pageNameCharset = 'UTF8'; $config->pageNameWhitelist = "$-_.+!*'(),äöüßÄÖÜabcdefghijklmnopqrstuvwxyz0123456789"; .htaccess: RewriteCond %{REQUEST_URI} "^/~?[-_/a-zA-Z0-9äöüß.+!*'(),]*$" How to debug this? (Haven't configured PHP debug in VSC with DDEV.😆) 🙏👋