User picker not working when creating a promotion #1890

Closed
bryanmtl opened this Issue Aug 27, 2012 · 11 comments

Comments

Projects
None yet
5 participants
@bryanmtl
Contributor

bryanmtl commented Aug 27, 2012

When searching for a user to tie a promotion to, the following JS error is returned:

Uncaught TypeError: Cannot call method 'replace' of undefined

The error is a result of the JSON being returned, the format expected should be "basic".

I'll submit a patch for this shortly.

@radar

This comment has been minimized.

Show comment
Hide comment
@radar

radar Aug 27, 2012

Member

Which version of Spree?

Member

radar commented Aug 27, 2012

Which version of Spree?

@bryanmtl

This comment has been minimized.

Show comment
Hide comment
@bryanmtl

bryanmtl Aug 27, 2012

Contributor

1.1.3 - I imagine it's happening in 1.2 as well though.

Contributor

bryanmtl commented Aug 27, 2012

1.1.3 - I imagine it's happening in 1.2 as well though.

@bryanmtl

This comment has been minimized.

Show comment
Hide comment
@bryanmtl

bryanmtl Aug 27, 2012

Contributor

Sorry, scratch that. I see that you've removed it from 1.2.

72676ab

Contributor

bryanmtl commented Aug 27, 2012

Sorry, scratch that. I see that you've removed it from 1.2.

72676ab

@lcx

This comment has been minimized.

Show comment
Hide comment
@lcx

lcx Aug 30, 2012

having the same issue. Worked in 1.1.2-beta after upgrading to 1.1.3 it stoped working.
If however you search and receive no result, it works and "no result found" is displayed. If you search for something that returns a result the mentioned error appears.
I'll wait for that patch :)

lcx commented Aug 30, 2012

having the same issue. Worked in 1.1.2-beta after upgrading to 1.1.3 it stoped working.
If however you search and receive no result, it works and "no result found" is displayed. If you search for something that returns a result the mentioned error appears.
I'll wait for that patch :)

@amencarini

This comment has been minimized.

Show comment
Hide comment
@amencarini

amencarini Sep 6, 2012

Contributor

Sorry to bother: how come you decided to drop the userPicker?
Thanks!

Contributor

amencarini commented Sep 6, 2012

Sorry to bother: how come you decided to drop the userPicker?
Thanks!

@radar

This comment has been minimized.

Show comment
Hide comment
@radar

radar Oct 9, 2012

Member

A workaround for this issue is to create a one-time use coupon for the user and then get them to use that on their next checkout. We dropped the user picker in 1.2 when we moved the auth components out of the default bundled components.

Member

radar commented Oct 9, 2012

A workaround for this issue is to create a one-time use coupon for the user and then get them to use that on their next checkout. We dropped the user picker in 1.2 when we moved the auth components out of the default bundled components.

@radar

This comment has been minimized.

Show comment
Hide comment
@radar

radar Oct 9, 2012

Member

Oh, it's actually still there. It seems my memory is bad.

It's still there, but broken. I will look at fixing this some time this week most likely, refactoring it along the same lines as the variant autocomplete refactoring I completed last week.

Member

radar commented Oct 9, 2012

Oh, it's actually still there. It seems my memory is bad.

It's still there, but broken. I will look at fixing this some time this week most likely, refactoring it along the same lines as the variant autocomplete refactoring I completed last week.

@radar radar closed this in cfa853d Nov 14, 2012

radar added a commit that referenced this issue Nov 14, 2012

[promo] Fix user picker
Fixes #1890

Conflicts:

	core/app/views/spree/admin/shared/_routes.html.erb
	promo/app/views/spree/admin/promotions/rules/_user.html.erb
@radar

This comment has been minimized.

Show comment
Hide comment
@radar

radar Nov 14, 2012

Member

I've fixed this up in 1-2-stable and master now. Apologies for it taking so long!

Member

radar commented Nov 14, 2012

I've fixed this up in 1-2-stable and master now. Apologies for it taking so long!

@amencarini

This comment has been minimized.

Show comment
Hide comment
@amencarini

amencarini Nov 14, 2012

Contributor

No worries @radar and thanks for the help, I'll give it a go ASAP!

Contributor

amencarini commented Nov 14, 2012

No worries @radar and thanks for the help, I'll give it a go ASAP!

huoxito added a commit to huoxito/spree that referenced this issue Dec 6, 2012

[promo] Fix user picker
Fixes #1890

Conflicts:

	core/app/views/spree/admin/shared/_routes.html.erb
	promo/app/views/spree/admin/promotions/rules/_user.html.erb
@huoxito

This comment has been minimized.

Show comment
Hide comment
@huoxito

huoxito Dec 6, 2012

Member

Hey guys does it still works on master / 1-3-stable? It looks like it doesn't. I cherry-pick this commit and make it worked great on our fork though. Thanks!

I just had to make a small change, maybe due to the fact we can't track a stable branch right now. See huoxito@0c5b1c5

Member

huoxito commented Dec 6, 2012

Hey guys does it still works on master / 1-3-stable? It looks like it doesn't. I cherry-pick this commit and make it worked great on our fork though. Thanks!

I just had to make a small change, maybe due to the fact we can't track a stable branch right now. See huoxito@0c5b1c5

@huoxito

This comment has been minimized.

Show comment
Hide comment
@huoxito

huoxito Dec 6, 2012

Member

Ok I think it's not working because of this 37c6430. you missed a dot. I'll confirm and pull request if it works

Member

huoxito commented Dec 6, 2012

Ok I think it's not working because of this 37c6430. you missed a dot. I'll confirm and pull request if it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment