I upgraded to the latest version yesterday (not sure if it's related though), and when I today needed to change some alias settings and update all nodes of a certain type, this happens:

* I select all nodes I want to update (on admin/content/node). I select Update URL alias in the Operations dropdown, and save. Result -> Alias is deleted on all selected nodes, setting them back to node/nid!
* I select all nodes again, thinking that this time new aliases will be created, since they at this time don't have an alias. Hit save, and nothing happens. All nodes still have no alias.

When I go and edit each one of these nodes, I have to select Automatic Alias, which is unchecked, after which a new alias is created when saved.

How do I bulk update a bunch of nodes aliases? I'd really hate to go in and edit 1200 nodes manually...

CommentFileSizeAuthor
#4 pathauto.module.patch554 bytesanon

Comments

jmlane’s picture

What if you go to admin/build/path/pathauto and under "Node path settings" check the "Bulk generate aliases for nodes that are not aliased" checkbox? Be sure to check the alias patterns are correct for your various content types before you hit save configuration.

That is how I've been doing my bulk alias updates, which is working fine in both 6.x-1.2 and 6.x-2.x.

blackdog’s picture

Nope, no aliases created that way either...

univac’s picture

subscribe
bulk update does not work with my installation either. got a blank page...
am running D6.14 + i18n-6.x-1.1 + cck-6.x-2.5 + Token-6.x-1.12 +...

anon’s picture

Status: Active » Needs review
StatusFileSize
new554 bytes

The problem is that the node language isnt passed to the "pathauto_create_alias" function when do a bulk update path alias.

6.x-1.1 has the same problem.

Here is a patch that resolves the issue (for 6.x-1.2)

anon’s picture

Component: Code » I18n stuff
greggles’s picture

Will this also work on sites that do not use locales? Is this a duplicate of any other issues in the queue?

univac’s picture

Hi anon and greggles,

thanks for the quick patch.
Unfortunately it does not work in my case. The behavior is very much the same and I get a blank page after waiting several seconds.

Thanks again,
univac

greggles’s picture

Blank page means you ran out of memory. Try increasing your php.ini memory_limit value (search for details on how to do this - it is called a WSOD).

blackdog’s picture

@greggles - I don't see how this would affect sites without i18n needs, but I haven't tried it. This issue solves the bulk updating to work for i18n enabled sites, I can't see any other issues that does that.

The patch in #4 solves the issue I had, because without $node->language, pathauto_create_alias() will always resolve to using no language dependent patterns. See this snippet from pathauto_create_alias():

if (!empty($type)) {
    $pattern = trim(variable_get('pathauto_'. $module .'_'. $type .'_'. $language .'_pattern', ''));
    if (empty($pattern)) {
      $pattern = trim(variable_get('pathauto_'. $module .'_'. $type .'_pattern', ''));
    }
  }
  if (empty($pattern)) {
    $pattern = trim(variable_get('pathauto_'. $module .'_pattern', ''));
  }
univac’s picture

@greggles

thanks for you prompt reply.
I use 128M as php memory limit, which is quite a lot. I have even raised to 512M for testing purpose, but with no luck.
Moreover I have really a few nodes in my testing environment.
By the way, the creation of single aliases works fine.

Thanks again,
univac

UPDATE: I have the very same problem with Path module. I have created an issue under the latter project.

mindaugasd’s picture

I deleted all users aliases and I want to bulk generate new aliases. But it do not work. It says "Bulk generation of users completed, 0 aliases generated." now none users have one.

LaurenH’s picture

#11 describes my problem exactly. I was trying to change the way that paths were auto-generated for users, and so I deleted all existing aliases. Creating the new aliases does not work.

PieWie’s picture

Status: Needs review » Reviewed & tested by the community

hi

i have the same problem

I downgrade to 6.x.-1.1 end this problem dose exist

IbnDrupal’s picture

Status: Reviewed & tested by the community » Needs work

I've moved this back to work as it isn't fixed and downgrading to a previous version is not a fix, although I can confirm that even downgrading doesn't fix the problem.

Just to confirm this is the issue.

I deleted all my taxonomy aliases (about 1200).

I then tried to use the bulk setting feature to recreated them. I am doing 200 at a time so memory is not a problem.

I get the following message

    * The configuration options have been saved.
    * Bulk generation of terms completed, 0 aliases generated.

I tried the patch and it does not fix the problem. I even checked the database table url_alias and nothing.

And I maybe wrong about this, but it isn't an internationalisation problem as its all in English.

izmeez’s picture

subscribe

IbnDrupal’s picture

Status: Fixed » Needs work

OK guys, I've solved this problem for me. (#14, #11 and several others including parent)

Go to admin/build/path/pathauto -> "automated alias settings" -> "General Settings"

and change the "Update Actions:" settings to "Create a new alias. Delete the old alias." (Mine was set to "Do nothing. Leave the old alias intact")

Then when I use the bulk update it worked.

I'm moving this to fixed as the following issues deal with the problem of the "Do nothing...." setting:

#478718: Update action "do nothing" should do more...
#285042: "Do Nothing" Should Still create aliases for unaliased items

IbnDrupal’s picture

Status: Needs work » Fixed
hass’s picture

Status: Needs work » Fixed

#639512: Massgeneration of aliases creates only 50 links!? What's about the other 120.000 aliases? seems to be a follow up. I haven't found any batch API/cron stuff in the module so I expect that this bulk update doesn't work reliable. Aside - I need to update 120.000-180.000 aliases.

blackdog’s picture

Title: Path auto bulk update broken » Path auto bulk update broken with i18n
Status: Fixed » Needs review

Ok, we have several different issues here. My post (#1) was regarding updating aliases on a multilingual site.
My issue is fixed with the patch in #4. That patch has nothing to do with some of the other issues here.

Other people here has taken over the issue with other problems with bulk updating etc.

@hass (#18) - use the Views bulk operations module if you can. It uses the Batch API.

hass’s picture

OT: This bug have nothing to do with Views.

blackdog’s picture

@hass - I know. I was just suggesting a solution if you need it right now.

ressa’s picture

I also have the problem of URL aliases not being generated on a multilingual web site, after deletion of aliases.
The patch in #4, does not solve the problem, sadly...

AlanAtLarge’s picture

Hi

The original post in this thread says the problem begins with 1200 Nodes that have, "Automatic Alias, which is unchecked." If they are unchecked I would not expect any updates to those records no matter what the settings are.

ISSUE:
I think the question being asked is, "how do I change 1200 nodes to have Automatic Alias *checked* without having to go into each node and manually checking the box 1200 times.

Since I'm in the same boat, I'm very very interested too. I've Drupal'd and Googled my fingers raw. This isn't an isolated problem, but I haven't come across an answer yet.

I have the issue on both a multilingual site and a basic installation.

Thanks
Alan

dave reid’s picture

Issue tags: +bulk

Tagging all the bulk alias issues for #713238: RFC: Pathauto Bulk module.

dave reid’s picture

Status: Needs review » Fixed

Committed #4 to all three CVS branches. Doesn't make sense that this is the only place we're calling pathauto_create_alias() with a node and not providing $node->language.
http://drupal.org/cvs?commit=330262
http://drupal.org/cvs?commit=330264
http://drupal.org/cvs?commit=330266

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Marko B’s picture

#4 patch is in 1.3 version but id doesnt help with big problem with languages and aliases when bulk updating. :-(

pfournier’s picture

In reply to #22, I noticed that bulk update only updates node in the current language (fr/admin/build/path/pathauto will only update nodes in french).

Use admin/content/node/overview to update nodes in all languages (but only 50 at a time...)