I don't know how many still uses 6.x-1.0 version but did notice that form redirect returns wrong path URL when editing or deleting existing address.

Error is caused due to $address_user being NULL when editing or deleting existing addresses.

Attached is patch for correction against 6.x-1.dev branch.

Also happy to be co-maintainer of uc_addresses if access granted.

CommentFileSizeAuthor
uc_addresses_form_redirect.patch1.4 KBmitrpaka

Comments

Status: Needs review » Needs work

The last submitted patch, uc_addresses_form_redirect.patch, failed testing.

mitrpaka’s picture

Version: 6.x-1.0 » 6.x-1.x-dev
mitrpaka’s picture

Status: Needs work » Needs review

uc_addresses_form_redirect.patch queued for re-testing.

megachriz’s picture

Status: Needs review » Postponed (maintainer needs more info)

I haven't looked at the 6.x-1.x code for quite a while, but the data about the user should be available ($address_user shouldn't be NULL).

In uc_addresses_get_address_form(), ± line 922:

  $form['stored_values'] = array(
    '#type' => 'value',
    '#value' => array(
      'user' => $address_user,
      'address' => $address,
      'view' => $view
    ),
  );

In uc_addresses_get_address_form_submit(), ± line 1039:

  $address_user = $form['stored_values']['#value']['user'];

Do you use a module that modifies account subpaths? Specifically, is the path user/[uid]/addresses aliased? I know Ubercart Addresses is incompatible with the 'me aliases' module (see #1252424: Incompatible with 'me' aliases).

megachriz’s picture

Thanks for your offer for being co-maintainer! But first, you maybe want to supply some more patches in the issue queue before I grant you access (so I know you know your way in the Ubercart Addresses code).

mitrpaka’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Ok - Was not aware of 'me' aliases issues.

uc_addresses worked ok after 'me' module was disabled. Sorry about confusion.

Patch can be applied if uc_addresses used with 'me' module ;-)