Vvveb icon indicating copy to clipboard operation
Vvveb copied to clipboard

Pages now all have a -nn appended on save - V1.04

Open Twilight-Computer opened this issue 1 year ago • 1 comments

Upgraded to V1.04 and pages no longer link.

When pages are edited the url seems have have one or two digits appended to the page url on save, breaking menu and other html links ?

eg Contact page is no longer page/contact, but page/contact-7 image

Twilight-Computer avatar Sep 29 '24 08:09 Twilight-Computer

The id's were added recently to avoid adding page redirects or have broken urls when a page slug changes for external url's.

You can revert to the previous format where only slug is used by changing

'/{slug}-#post_id#' => ['module' => 'content/post/index', 'edit'=>'?module=content/post&post_id={post_id}&type=post'],
'/page/{slug}-#post_id#' => ['module' => 'content/page/index', 'edit'=>'?module=content/post&post_id={post_id}&type=page'],

to

'/{slug}'        => ['module' => 'content/post/index', 'edit'=>'?module=content/post&slug={slug}&type=post'],
'/page/{slug}'   => ['module' => 'content/page/index', 'edit'=>'?module=content/post&slug={slug}&type=page'],

in config/routes.php https://github.com/givanz/Vvveb/blob/master/config/routes.php#L145-L148

Or you can change menu items to type = page to have links generated automatically.

page-type

givanz avatar Sep 30 '24 09:09 givanz