hey roberto,
very sorry to bother you again... after your fix i reinstalled localizer3 from cvs. i stumbled over another issue: it seems to be incompatible with usernode. just before reinstalling, i registered a test-user and the usernode was created without any flaws. after enabling, no usernode is being created. I tried setting the content-type 'usernode' to 'translatable' and 'not translatable' at 'admin/settings/localizer'->content settings, but in no case a usernode was created.

i set this to critical, because usernode is a really essential module in my opinion, a lot of modules rely on it. please let me know if you think this is a usernode-bug.

thx

...sebastian

Comments

Roberto Gerola’s picture

Usernode is simply a content type.
It is created during user creation.

At now I'm using it too with Localizer and didn't find any problem.
I'll test it again to be sure.
The only possible problem could be an error somewhere that stops
the execution of the hooks.

If you have update Localizer recently, have you rune the update.php procedure ?
I added a new field to the localizeruser table in these days.

Let me know.

Thanks

artycul’s picture

i definitely ran update.php after reinstalling. i checked the watchdog and apache-logs, no error. i uninstalled localizer again, then looked at my database and it seems like localizer_uninstall() didn't work for me (using mysql btw). i removed all tables manually and renamed the two .module-files.
being clean, i started over again with installing. i then enabled one localizer-module at a time and created and deleted users ;) these are the results:

  • just Localizer: usernode created
  • Localizer.module + Localizer menu: usernode created
  • Localizer.module + Localizer menu + Localizer node: usernode not created
  • Localizer.module + Localizer menu again: usernode created
  • Localizer.module + Localizer menu + Localizer taxonomy +Localizer user + Localizer variables + Localizer views: usernode created
  • then i enabled all modules again and created an account via the admin-interface and the usernode was created (!!!)
  • tried a few more times with all localizer-modules enabled but disabling captcha and other modules but usernode was never created

so i think this has to do sth with the localizernode.module ;)

Roberto Gerola’s picture

Assigned: Unassigned » Roberto Gerola
Priority: Critical » Normal

The issue appears only when a user is created by a new visitor.

The problem is the usernode_save_node function.
It call a form only to create a new node. I wonder why.

With this version also localzier can work correctly , but
I would need to investigate why the original version doesn't work.

function usernode_save_node($data) {
$values = array();

// workaround to disable drupal message "Your usernode has been created"
$messages = drupal_get_messages();

// create the usernode
$node = new stdClass();
$node->type = $data['type'];
$node->title = $data['title'];
$node->uid = $data['user']->uid;
node_save($node);

// write back the old messages
$_SESSION['messages'] = $messages;
}

Roberto Gerola’s picture

Status: Active » Fixed

From my point of view this behaviour of usernode is not correct.
The usernode is not created because the anonymous user has no grant
to create content in any language for localizer.
The validate hook is fired up, but usernode ignores the validate response.

I added a workaround for this, disabling validate for anonymous users.
See the localizernode.module form cvs.

jmlavarenne’s picture

So the localizernode.module can be used instead of the code modification you suggest for usernode_save_node() ?

Roberto Gerola’s picture

Yes

jmlavarenne’s picture

Ok, just to be sure I'm doing what I should -

I'm going to get the latest version of localizernode.module, tagged HEAD, from the CVS repository and replace my version of the file with this one.

Right?

Roberto Gerola’s picture

artycul’s picture

thanks for that very quick fix. i can confirm it works flawlessly now. should we post an issue at the usernode module queue linking back here?

jmlavarenne’s picture

Sorry for being a real nerd, but I'm just going to attempt to make this very clear.

Does the localizernode.module revision version 1.21 (the one found in the link above) work for localizer 1.10, or does it work with localizer 3.ALPHA?

Roberto Gerola’s picture

localizernode.module revision version 1.21 is only for 3.x branch

jmlavarenne’s picture

Does this mean there are no issues between localizer 1.10 and usernode?

Anonymous’s picture

Status: Fixed » Closed (fixed)

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