# AutoID Plugin (create unique page ids)

**URL:** <https://forum.getkirby.com/t/autoid-plugin-create-unique-page-ids/2494>\
**Category:** Plugins\
**Created:** [November 13, 2015, 5:06pm UTC](https://forum.getkirby.com/t/autoid-plugin-create-unique-page-ids/2494 "2015-11-13T17:06:27Z")\
**Posts on this page:** 14\
**Page:** 2

<div class="post-metadata">

**Author:** ![Ti\_Gr](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/ti_gr/32/98_2.png) [@Ti\_Gr](https://forum.getkirby.com/u/Ti_Gr)\
**Post date:** [May 17, 2016, 7:10pm UTC](https://forum.getkirby.com/t/autoid-plugin-create-unique-page-ids/2494/21 "2016-05-17T19:10:35Z")

</div>

@helllicht I would like to know that too 🙂

---

<div class="post-metadata">

**Author:** ![TakioTk](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/takiotk/32/3133_2.png) [@TakioTk](https://forum.getkirby.com/u/TakioTk)\
**Post date:** [May 17, 2016, 7:38pm UTC](https://forum.getkirby.com/t/autoid-plugin-create-unique-page-ids/2494/22 "2016-05-17T19:38:44Z")

</div>

hi @Ti_Gr I continued this topic in the question categorie.  
Short answer: `->findBy('$field', $value())`

The longer version: you can find here [Get the page object from a given field value](https://forum.getkirby.com/t/get-the-page-object-from-a-given-field-value/3977)

good luck!

---

<div class="post-metadata">

**Author:** ![Ti\_Gr](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/ti_gr/32/98_2.png) [@Ti\_Gr](https://forum.getkirby.com/u/Ti_Gr)\
**Post date:** [May 17, 2016, 8:24pm UTC](https://forum.getkirby.com/t/autoid-plugin-create-unique-page-ids/2494/23 "2016-05-17T20:24:34Z")

</div>

Thank you @TakioTk for your reply. works great 🙂

---

<div class="post-metadata">

**Author:** ![bnomei](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/bnomei/32/775_2.png) [@bnomei](https://forum.getkirby.com/u/bnomei)\
**Post date:** [March 9, 2017, 5:08pm UTC](https://forum.getkirby.com/t/autoid-plugin-create-unique-page-ids/2494/24 "2017-03-09T17:08:21Z")

</div>

anybody looking to speed up autoid? here is how…

[https://github.com/helllicht/kirby-autoid/issues/7](https://github.com/helllicht/kirby-autoid/issues/7)

---

<div class="post-metadata">

**Author:** ![jimbobrjames](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jimbobrjames/32/5802_2.png) [@jimbobrjames](https://forum.getkirby.com/u/jimbobrjames)\
**Post date:** [March 14, 2018, 9:58pm UTC](https://forum.getkirby.com/t/autoid-plugin-create-unique-page-ids/2494/25 "2018-03-14T21:58:51Z")

</div>

Anyone had the same problem as me on Kirby 2.5.9? The AutoId field doesn’t get a value. I have filed a github issue for it, but wondered if it was just me.

I have old pages where the AutoID seems to have to stuck, but ive just created some new ones since upgrading to 2.5.9 and the ID field is blank after saving.

---

<div class="post-metadata">

**Author:** ![lukasbestle](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/lukasbestle/32/11437_2.png) [@lukasbestle](https://forum.getkirby.com/u/lukasbestle)\
**Post date:** [March 15, 2018, 3:44pm UTC](https://forum.getkirby.com/t/autoid-plugin-create-unique-page-ids/2494/26 "2018-03-15T15:44:15Z")

</div>

I tried reproducing this with a fresh installation of the 2.5.9 starterkit. It works for me just fine. Have you verified that you have installed the plugin correctly?

---

<div class="post-metadata">

**Author:** ![jimbobrjames](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jimbobrjames/32/5802_2.png) [@jimbobrjames](https://forum.getkirby.com/u/jimbobrjames)\
**Post date:** [March 15, 2018, 4:12pm UTC](https://forum.getkirby.com/t/autoid-plugin-create-unique-page-ids/2494/27 "2018-03-15T16:12:09Z")

</div>

@lukasbestle Intresting. Thanks for trying, yes plugin has been working up until now (sites about a year old). The only thing thats changed is that i recently updated to 2.5.9.

Edit: I just rolled back to 2.5.8, and it works. I’m running this on Laravel Valet on High Sierra (PHP 7).

---

<div class="post-metadata">

**Author:** ![jimbobrjames](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jimbobrjames/32/5802_2.png) [@jimbobrjames](https://forum.getkirby.com/u/jimbobrjames)\
**Post date:** [March 15, 2018, 4:35pm UTC](https://forum.getkirby.com/t/autoid-plugin-create-unique-page-ids/2494/28 "2018-03-15T16:35:34Z")

</div>

@lukasbestle the odd thing is, that I just setup the starterkit for 2.5.9 and installed autoid and it worked fine. How odd.

I reinstalled 2.5.9 and autoid (exact same version but replaced anyway) and now it works on the website i had the issue on.

Could the issue with sorting more then 10 articles that was fixed in the toolkit lately be the cause? I manually edited the single line of code as you suggested in the Github issue. Now i’m running a Kirby that does not have this fix. Im guessing autoid looks for all the articles and sorts them to work out what the next ID number should be, so it seems logical to me this might be linked.

---

<div class="post-metadata">

**Author:** ![lukasbestle](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/lukasbestle/32/11437_2.png) [@lukasbestle](https://forum.getkirby.com/u/lukasbestle)\
**Post date:** [March 15, 2018, 5:06pm UTC](https://forum.getkirby.com/t/autoid-plugin-create-unique-page-ids/2494/29 "2018-03-15T17:06:32Z")

</div>

Yes, that might be the issue. That’s probably why I couldn’t reproduce it in my test installation as that’s actually on the develop branch. 😅

2.5.10 with the sorting fix will be out (very) soon!

---

<div class="post-metadata">

**Author:** ![jimbobrjames](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jimbobrjames/32/5802_2.png) [@jimbobrjames](https://forum.getkirby.com/u/jimbobrjames)\
**Post date:** [March 16, 2018, 9:35am UTC](https://forum.getkirby.com/t/autoid-plugin-create-unique-page-ids/2494/30 "2018-03-16T09:35:40Z")

</div>

@lukasbestle Oh dear. Just upgraded to 2.5.10, and the issue with AutoID persists ☹

---

<div class="post-metadata">

**Author:** ![lukasbestle](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/lukasbestle/32/11437_2.png) [@lukasbestle](https://forum.getkirby.com/u/lukasbestle)\
**Post date:** [March 16, 2018, 1:04pm UTC](https://forum.getkirby.com/t/autoid-plugin-create-unique-page-ids/2494/31 "2018-03-16T13:04:34Z")

</div>

Hm, but didn‘t you say that it works with the starterkit? Maybe there‘s something special about your site. To debug this, I need further information.

---

<div class="post-metadata">

**Author:** ![jimbobrjames](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jimbobrjames/32/5802_2.png) [@jimbobrjames](https://forum.getkirby.com/u/jimbobrjames)\
**Post date:** [March 16, 2018, 1:08pm UTC](https://forum.getkirby.com/t/autoid-plugin-create-unique-page-ids/2494/32 "2018-03-16T13:08:38Z")

</div>

it works with 2.5.9 startkit & my site **without** the manually added sorting fix as per [github](https://github.com/getkirby/toolkit/commit/a5ff8d87daf3d0182d3f3b84d45ee6941087cd93)

It does not work in 2.5.9 **with** that fix applied, nor does it work in 2.5.10.

If i roll back to 2.5.8, everythings peachy 🙂

If i create a page with the patched 2.5.9 or 2.5.10, the autoid field does not get a value. If i roll back to official 2.5.9 or 2.5.8, and then go back in and save the same page, hey presto it gets a value. The site has 20 or so pages in it. i dont know if it works on a site with pages under the limit that seems to trigger the bug.

I repeated this two or three times, and it happens everytime. I hope that helps.

---

<div class="post-metadata">

**Author:** ![lukasbestle](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/lukasbestle/32/11437_2.png) [@lukasbestle](https://forum.getkirby.com/u/lukasbestle)\
**Post date:** [March 16, 2018, 2:28pm UTC](https://forum.getkirby.com/t/autoid-plugin-create-unique-page-ids/2494/33 "2018-03-16T14:28:29Z")

</div>

We needed to change something in 2.5.10 shortly after the initial release this morning. Could you please download 2.5.10 again to make sure that you have the correct version?

---

<div class="post-metadata">

**Author:** ![jimbobrjames](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jimbobrjames/32/5802_2.png) [@jimbobrjames](https://forum.getkirby.com/u/jimbobrjames)\
**Post date:** [March 16, 2018, 2:37pm UTC](https://forum.getkirby.com/t/autoid-plugin-create-unique-page-ids/2494/34 "2018-03-16T14:37:25Z")

</div>

@lukasbestle Whoop! good job! Downloaded fresh copy and now all is well. AutoID working again. 💫

[Previous page](https://forum.getkirby.com/t/autoid-plugin-create-unique-page-ids/2494.md?page=1)
