Developer forum

Forum » Development » UserAddressOnAfterSave receives empty args when saving AccessUser address

UserAddressOnAfterSave receives empty args when saving AccessUser address

Mikkel Hammer
Mikkel Hammer
Reply

Dear Dynamicweb,

We're trying to update the Carts customer information, with a UserAddressOnAfterSave NotificationSubscriber, when a user changes their default address through the Extranet module in the frontend. It's so they don't need to empty the cart before the changes to the address go through.
But when the user selects the "autogenerated" address thats created from the AccessUser address fields in the address list, the NotificationArgs is a empty UserAddress, how can we solve this?

I've attached two examples, the first one is the autogenerated one thats empty and the second one is a created address that works fine.

Best regards,
Mikkel

default_address_1.png default_address_2.png

Replies

 
Nicolai Pedersen
Reply
This post has been marked as an answer

With the first one with the 'autocreated' address that actually comes from the user object, you have to use the usersaved notification instead.

BR Nicolai

Votes for this answer: 1
 
Mikkel Hammer
Mikkel Hammer
Reply

Hi again Nicolai,

i don't know if you've done anything recently with how the URL is generated when accessing forums posts, but i can't access my other post "/dwapi/users/addresses" through "Threads started by me" and sometimes through the /development forum either (it generates this link - http://doc.dynamicweb.com/Default.aspx?ID=1057&PID=1605&ThreadID=79424). It thinks the naming of my post is part of the URL and just redirect (https://doc.dynamicweb.com/forum/development/development//dwapi/users/addresses), i can only access it through a link a colleague sent me. (https://doc.dynamicweb.com/forum/development?ThreadID=79525)


Best regards,
Mikkel

 
Nicolai Pedersen
Reply

Hi Mikkel

That should be fixed now!

 
Mikkel Hammer
Mikkel Hammer
Reply

Hi Nicolai, sorry for posting on an old thread, but it's related to the URL generation i mentioned in here.
I don't know if you're aware, but the fix you made for URLs for forum post has made any "old" links prior to that change unusable.

fx all these links doesn't work, because they use the "old" route syntax with the / before the thread title

so you have to manually change them from using / to - before the title
http://doc.dynamicweb.com/forum/swift/installing-swift-on-an-existing-solution?PID=1605
to
http://doc.dynamicweb.com/forum/swift-installing-swift-on-an-existing-solution?PID=1605

Is it possible you can make some sort of rerouting if it uses the old syntax :)

Best regards,
Mikkel

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Yeah, I ran into the same issue, reported here: https://doc.dynamicweb.com/forum/cms-standard-features/cms-standard-features-forum-links-are-broken

 
Nicolai Pedersen
Reply

I have fixed the config so that the old links work again. 

 
Mikkel Hammer
Mikkel Hammer
Reply

Seems like that fix now ruins posts that contains / in the title, atleast these 3 are unusable now

 
Nicolai Pedersen
Reply

That was probably why that setting was made.

I just changed the forum url provider to handle this - so now both should work!!

 
Mikkel Hammer
Mikkel Hammer
Reply

Seems like that did the job!
Thanks a lot Nicolai :)

 
Mikkel Hammer
Mikkel Hammer
Reply

Sorry to bother again Nicolai, but im finding "dead" links on google due to fix that got made here to how links on the forum are made, but then got reserved again.

When i search on "dynamicweb jquery" on google and click the second link, it tries to go to https://doc.dynamicweb.com/forum/templates-problem-with-jquery-tabs?PID=1605​ which was a temporary fix to allow forum post to start with a / in the name. You can see the arrow that after the forum category it's and - (dash) instead of a / (slash).

But that got reserved because it made all prior links to the forum post "dead" links. So now the "correct" link for the above google link is http://doc.dynamicweb.com/forum/templates/problem-with-jquery-tabs?PID=1605.

I think the old fix just made the / after the forum category to a - instead.
Is there a way you can support both the links so we don't have any dead forums post (and so my colleagues don't blame me for ruining every forum link) :^) 

Best regards,
Mikkel

 
Nicolai Pedersen
Reply

No, that is not possible to do both.

Google will fix it eventually.

Sorry about the inconvenience.

BR Nicolai

 

You must be logged in to post in the forum