Change URL in panel not sticking

I entered a record as 0-some-title in the panel, saved, previewed, works as expected. Selected the same record to edit, chose “change URL”, changed URL from 0-some-title to some-title. I expected this to remove the record from (pre)view, but it didn’t, nor did it re-save the record as some-title … it’s still 0-some-title.

For experimentation, I changed the record in Coda outside the panel, from 0-some-title to some-title.

Then, I logged back into the panel, but it still shows the record as 0-some-title even though it is some-title in Coda. When I select Change URL, it shows the ‘correct’ saved) URL (some-title). For kicks, I tried to change it within the panel to 0-some-title. This saved the record with the real filename going from some-title to 0-0-some-title.

Gak. I am giving the panel for use to others for the first time and this will cause major heartburn. Ideas?

When I create a page with a leading number in the URL-appendix field, like “0-something”, the URL is actually saved as "something, and the page has a sorting number of “0” when I look at the subpages’ list.
If I do it multiple times or use a leading number already in use, there can be multiple pages with the same number. They are not automatically re-numbered until you drag/sort them in the panel.

Then I can edit and save the title, it works. What is your Kirby version?

Your users don’t have to enter any leading number anyway, they can always order pages in the subpages view.

Thank you and I was using 2.X, so I did upgrade to 2.1. Now, could you or someone verify this as a bug or correct my ignorance - I will be very grateful. This has cost me two hours so far, though I understand the panel much better, admittedly.

(There is a reason I don’t use the custom “phone” field and, of course, that’s unrelated to this issue).

What I do … launch records that have worked perfectly for months (alphabetic) into the panel. Looks great. Displays alphabetically. All have the ‘0’. Then I delete one of them. Bang: they’re all saved now as sequential.

What I do … reload those records from backup. Then I make one of them invisible and save it. Bang: they’re all saved now as sequential.

What I do … start from scratch and create three alphabetized records in the panel, adding 0-file-name by hand in the URL field. It works and previews correctly. Then, I make one of them invisible. It becomes invisible and the other two are put into sequential order.


Here is my blueprint file:

<?php if(!defined('KIRBY')) exit ?>

title: Families
pages: false
files: true
    label: Title
    type: text
    label: Name
    type: text
    label: Street
    type: text
    label: City State and Zip
    type: text
    label: Email One
    type: email
    width: 1/2
    label: Phone One
    type: text
    width: 1/2
    label: Students
    type: text

Ok, so you want alphabetical sorting with a prepended “0”. Have you set the numbering to alphabetical sorting in your parent blueprint:

  num: zero

You shouldn’t add anything manually in the URL-setting. That has nothing to do with the numbering of the pages. If you want to make a page visible/invisible, use the toggle switch or the page sorter.

Wow, this is fascinating-ly weird.

Okay, I did exactly as you suggested in the parent blueprint. Then, I added a new record (subpage) with title pattern of ‘some-name’ and added nothing in the URL. Eureka! Everything is good and saved and alphabetic. But when I used the sidebar toggle to make the new subpage ‘visible’, Kirby made it visible by saving all records as sequential, not alphabetic.

I even started again and entered the title as ‘some name’ without a hyphen in the title, since I knew it would be added in the URL. Hey, you never know. Didn’t help.

I suppose I can try from scratch again with an entirely new set of records, but this is getting exhausting.

I have to believe this isn’t just something about me, though I will love to be shown the error of my ways. Thanks to all who are helping … I am getting some egg-on-my-face with our users over this. I am not a PHP-weenie but have been doing websites for years, adore Kirby and have never hit anything remotely like this before with Kirby.


For completeness, here is the parent page blueprint:

<?php if(!defined('KIRBY')) exit ?>

title: Family Portal
  num: zero
files: false
deletable: false
  	label: Title
  	type: text
  	label: Text
  	type: text

Well, maybe it’a a bug after all, need to get some sleep now, so no testing today …

Due to the time pressure on me, hoping for an update. I can’t give the panel to our users until I can get this right. Thanks to all.

I just tried your blueprints, and well, everything seems to work as expected. Or maybe I didn’t understand the issue? I can make subpages visible/invisible and they stick to alphabetical order.

I’m really sorry for all the troubles but I just checked and it all works as expected. I wasn’t able to reproduce your issues. Are you sure that you’ve updated not just the panel, but also the kirby folder?

Yes, updated both, though it never hurts to triple-check.

Thanks as well for taking part and for your kind email and offer to help by inspection. Before taking up your time, which I’m sure goes best to development of cool new features, I will set-up a fresh instance for test and look for errors of mine.

I have now found the time to test this and can confirm that it works as expected.

The only thing that might be a bit irritating is when you change the URL, lets say you have a title and thus a URL of “afamily” and then change the URL to “gfamily”. Then the order that appears in the panel will still be “A” as long as the title is still “afamily”, because the sort order in the panel is according to title not uid. However, it wouldn’t make sense to change the URL if the title is not changed, would it?

When you output, the “internal” sort order by UID will be used, as long as you don’t sort by any other field.

If I change the title, the UID is updated automatically, so no problem.

@texnixe: thank you for repeated time and help.

Yeah, I can now confirm it also works as expected. Somehow, I overlooked a small name-(mis)match which ended up with my loading a slightly-wrong blueprint without my noticing. Dumb. Yet, your replies did teach me more about the panel implementation which, I hope, will be useful to others here.

And I am always happy to tell my users it was me, not the tool. It’s easy and tempting to blame our tools which deserve it often enough, but not good for users to wonder needlessly if “the software” really works or not.

Kirby isn’t bug-free, duh, but it really works. I love it.