givanz / Vvveb

Powerful and easy to use cms to build websites, blogs or ecommerce stores.
https://www.vvveb.com
GNU Affero General Public License v3.0
384 stars 82 forks source link

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

Open Twilight-Computer opened 1 month ago

Twilight-Computer commented 1 month ago

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

givanz commented 1 month ago

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