WBCE / WBCE_CMS

Core package of WBCE CMS. This package includes the core and the default addons. Visit https://wbce.org (DE) or https://wbce-cms.org (EN) to learn more or to join the WBCE CMS community.
https://wbce-cms.org
GNU General Public License v2.0
31 stars 22 forks source link

PAGE SPACER does not work #519

Closed a6smile closed 1 year ago

a6smile commented 1 year ago

I had try to change page spacer on wbce 1.5.3 but seem this does not work. also, default page created are use "_" instead "-"

instantflorian commented 1 year ago

Confirmed. The value is stored but not used. We'll have a look.

BerndJM commented 1 year ago

20 test pages later I found the bug (I think). In functions-utf8.php in line 493 the _ is hardcoded, if I replace it with PAGE_SPACER it seems to work as desired. Can someone please check this against?

Bold thesis: this has never worked before, because this place seems to have "always" looked like this ;-)

mrbaseman commented 1 year ago

unfortunately, I can't confirm. I have a page called "über mich" and without having changed the page spacer it seems to default to '-' and no matter what I use as PAGE_SPACER, the '-' is used , even when I save the page again after changing the setting. So, we should rather find a hard coded '-' somewhere or find out why the setting for page_spacer is not loaded properly or where it is not used as expected

dev4me commented 1 year ago

20 test pages later I found the bug (I think). In functions-utf8.php in line 493 the _ is hardcoded, if I replace it with PAGE_SPACER it seems to work as desired. Can someone please check this against?

This is only used to replace special characters that are not allowed in the filename. It is not used for whitespaces.

unfortunately, I can't confirm. I have a page called "über mich" and without having changed the page spacer it seems to default to '-' and no matter what I use as PAGE_SPACER, the '-' is used , even when I save the page again after changing the setting.

When the page is previously saved, that filename will not change after changing the PAGE_SPACER. It will only work for new created pages or when you manually change the filename using whitespaces.

BerndJM commented 1 year ago

This is only used to replace special characters that are not allowed in the filename. It is not used for whitespaces.

However, this place definitely replaces whitespaces with underscore (in the original state). Thus, replacing whitespaces with PAGE_SPACER later in the chain has no effect anymore.

mrbaseman commented 1 year ago

Right. I can confirm that the proposed fix works.

And as dev4me writes, once the filename is fixed when creating the page, is not changed anymore (unless one changes it manually in the preferences of an existing page). This makes sense.