[Feel free to move this to pathauto project if not an acid free bug]

Using the latest versions of both acidfree ("1184760010") and pathauto (5.x-1.2), I can use pathauto to create aliases of the form of
albums/[acidfreepath]/[title]
for all new albums I create.

But if I run path auto's bulk update, it ends up creating aliases that show empty string for acidfreepath, so ends up being:
albums/[title]

pathauto settings also include "Create a new alias, replacing the old one" for Update action, and then I do a bulk update for Node Settings, where Pattern for all Album paths has [acidfreepath] in it as shown above.

Using Drupal 5.2.

Comments

bwooster47’s picture

From a bit more research, looks like there need to be additional pathauto hooks in the acidfree module. Quoting from the pathauto/API.txt file (pathauto 5.x-1.2):

...
(see pathauto_node.inc, pathauto_taxonomy.inc, or pathauto_user.inc for examples).

1: ....
You must implement hook_pathauto($op), where $op is always (at this time) 'settings'.

2: $alias = pathauto_create_alias($module, $op, $placeholders, $src, $type=NULL)
At the appropriate time (usually when a new item is being created for which a generated alias is desired), call pathauto_create_alias() to generate and create the alias.

3: If a module supports bulk updating of aliases, it must provide a function of this form, to be called by pathauto when the corresponding checkbox is selected and the settings page submitted:

function _pathauto_bulkupdate()
...

The following part from pathauto/API.txt seems to be done in acidfree - but I don't see any of the above items:

implement the function _pathauto_node (or _taxonomy), accepting the arguments $op and $node (or $term). Two operations are supported:

$op = 'placeholders' - return an array keyed on placeholder strings

bwooster47’s picture

This looks to have been a different issue - not missing APIs.

pathauto module acts on all nodes, so it can do bulkupdates for acidfree nodes also.

The issue is that in AcidFree for Drupal 5.x, the Image module is used to store images.
But, one cannot use a pattern like this for Images:
images/[acidfreepath]/[title]
since the image module does not know how to fill in the [acidfreepath] placeholder.

[catpath] can be used to get the full path, but it starts with "acidfree-albums" - which is not useful at all, would like to have a global placeholder similar to acidfreepath - Concatentated Acidfree album path (minus root album).

This would be an issue anyone upgrading from 4.x will run into - if you are using aliases, make sure don't do a bulk-update - it will destroy all image links. For example, in 4.x, the automatically created links for both albums and images in acidfree followed one pattern - albums/[acidfreepath]/[title].
Now in 5.x, images and albums will follow two different patterns - I can't see anyway to make them the same yet...

Also: is there any harm in changing the vocabulary from "acidfree-albums" to just "albums" - that may be somewhat ok workaround, would make aliases look a bit better.

bwooster47’s picture

Status: Active » Closed (fixed)

Given that the latest pathauto (5.x-2.0) does not have acidfreepath, I am closing this issue that I opened a while ago.

Here are some possible workarounds:

After upgrading from 4.x to 5.x, you may have a Vocabulary named "AcidFree Albums" and the list of terms for this vocabulary will have the same phrase at the root - the top, root term will be "AcidFree Albums".

To avoid getting that in the [termpath-raw] expansions:
1) rename it to something else
or
2) move all the terms below it to the root.

Additionally, play with the Node Path patterns in pathauto - for example:
Image paths: images/[termpath-raw]/[title-raw]
Album paths: albums/[termpath-raw]/[title-raw]
may be a good starting point.