Jump to content

PageTable: Automatic Page Name Format is not working anymore


nurkka
 Share

Recommended Posts

Hi!

The feature Automatic Page Name Format of the PageTable field has stopped working after a ProcessWire upgrade.

grafik.thumb.png.62ae9ad732d20db52aef85d52c2b7d13.png

I was using the following configuration string, which worked perfectly before:
Y-m-d_H-i-s_\d\o\w\n\l\o\a\d

The config string was interpreted as PHP date format, where you can escape characters to mark them as non-date-formatting characters. The PHP docs state the following:grafik.png.25c4b2cc7ad8bd83c1fb844758d3389c.png

PageTable generated the page names like the following example: 2017-03-13_12-17-24_download

But after a ProcessWire upgrade (I assume it must have been version 3.0.123) the page names are now generated as follows: y-m-d-h-i-s-d-o-w-n-l-o-a-d

The config field settings description now states:

Quote

If the name format contains any non-alphanumeric characters, it is considered to be a PHP date format. If it contains only alphanumeric characters then it will be used directly, with a number appended to the end (when necessary) to ensure uniqueness. Example: Ymd:His is a good name format for date/time based page names.

So, I tried several other configurations, like:
Y-m-d:H-i-s \d\o\w\n\l\o\a\d

Which renders the date part correctly, but the string "download" is unfortunately also processed as a date format.

I assume the configuration setting is somehow filtered by ProcessWire before it is passed to the php date function. This was not the case in older versions of ProcessWire. Sorry, I haven't the time to test with which version the behaviour changed. The feature stopped working somewhere in january 2019, so I assume it must have been the upgrade to ProcessWire 3.0.123.

Has anyone similar issues with the Automatic Page Name Format in PageTable?

 

Edited by nurkka
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...