Skip to first unread message

Tim Schofield

unread,
Sep 2, 2022, 7:40:32 AMSep 2
to AtoM Users
I'm trying to  regenerate the slugs to reflect the reference code of items rather than the title - and it isn't doing it.

This is what I did
1. Go into settings and set Generate description permalinks to reference code - Save
2. php symfony propel:generate-slugs
3. php symfony search:populate
4. php symfony cc

I've cleared the browser cash also - the old items still have slugs based on the title -
new items I create have slugs based on the reference code as expected.

What am I doing wrong?

Regards

Tim



Dan Gillean

unread,
Sep 2, 2022, 9:40:38 AMSep 2
to ICA-AtoM Users
Hi Tim, 

Without using any of the options, the generate slugs task will ONLY generate slugs for any main entity records that are missing them. If you want to replace existing slugs, you'll need to use the --delete option. This option will first delete all existing slugs, before generating them again, and using the reference code settings for descriptions. 

One important consequence of this approach however: if you have used the Rename module to manually customize the slugs of some of your descriptions, these custom slugs will be lost, as they will be deleted as well!  You'll need to manually redo these customizations after. 

All of this is noted in the task documentation: 
Let us know how it goes! 

Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him


--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/0b983525-b5de-4a4d-9806-3e2731baa7acn%40googlegroups.com.

Tim Schofield

unread,
Sep 2, 2022, 9:44:49 AMSep 2
to ica-ato...@googlegroups.com
That's fantastic Dan! Thank you so much.

As always I'll make a backup before trying this.

Regards

Tim

You received this message because you are subscribed to a topic in the Google Groups "AtoM Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ica-atom-users/4_u58UDdzT0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/CAC1FhZJPi%2B7DNvLSoAZ9om-LUduabMJyoob2TkozP94e2i-08w%40mail.gmail.com.

Tim Schofield

unread,
Sep 8, 2022, 5:26:51 AMSep 8
to AtoM Users
Hi Dan and all,

So I succeeded in regenerating the slugs of per-existing collections, per your instructions Dan - thank you.

php symfony propel:generate-slugs --delete

Now the problem is that the slug is generated as if AtoM were set to "Inherit reference code", and the system is set NOT to Inherit reference code.
So a reference code like  AFA/AMERICA/MidTwentieth generates a slug like afa-afa-america-afa-america-midtwentieth, not afa-america-midtwentieth as I would like.

Are there any flags/settings to generate slugs without inheriting the reference code.

Regards

Tim

Dan Gillean

unread,
Sep 8, 2022, 9:35:48 AMSep 8
to ICA-AtoM Users
Hi Tim, 

It sounds like you want to use the Identifier setting for your permalinks instead, not one of the two reference code settings: 

slug-gen-settings.png
In AtoM, an identifier is the code associated with a particular description, while a reference code is ALWAYS a combination of elements to make it globally unique, as described in the Inherit reference code setting documentation: 

It sounds like in your case you've manually created reference codes in the identifier field of each description. In that case, just setting the Generate description permalinks setting to use identifiers, and then re-running the slug regen task with the --delete option, should hopefully give you the output you want. 

Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him

Tim Schofield

unread,
Sep 8, 2022, 10:15:22 AMSep 8
to ica-ato...@googlegroups.com
Perfect Dan, that did it.

Many Thanks

Tim

Reply all
Reply to author
Forward
0 new messages