Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression in 5.2.5 - not adding GUID hashes to duplicate slugs #892

Open
jeffblake opened this issue Jan 2, 2019 · 13 comments
Open

Regression in 5.2.5 - not adding GUID hashes to duplicate slugs #892

jeffblake opened this issue Jan 2, 2019 · 13 comments

Comments

@jeffblake
Copy link

I have something like this

class Event
   friendly_id :slug_candidates, use: [:slugged, :history, :finders]
    
  def slug_candidates
   [:name, [:name, :event_times]]
  end
end

Where event_times basically calls strftime on a date field, e.g. 4:00pm-5:00pm

So if I call dup with 5.2.5 on an existing record, and try to save the new one, it causes a unique index violation, but does not do that on 5.2.4

@jeffblake
Copy link
Author

Bump?

@parndt
Copy link
Collaborator

parndt commented Sep 24, 2019

Hmm thanks @jeffblake -- have you managed to track it down to a particular commit? I'm guessing it'll be the same in 5.3.0

@jeffblake
Copy link
Author

This perhaps? fd2d379

@stale
Copy link

stale bot commented Dec 11, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Dec 11, 2019
@jeffblake
Copy link
Author

Hi, thought I'd follow up on this.

@stale stale bot removed the stale label Dec 11, 2019
@stale
Copy link

stale bot commented Jan 22, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 22, 2020
@parndt parndt removed the stale label Jan 22, 2020
@parndt
Copy link
Collaborator

parndt commented Jan 22, 2020

I think this still needs fixing

@tfwright
Copy link

I just ran into this in 5.2.4 when using the history module. Updating a slug for an existing user was causing a slug collision. The reason was that some existing slugs didn't have corresponding history records. Creating those missing history records manually in console solved the issue. This seems like a bug because my expectation was that history was only a fallback for finding records, not a source of truth for creating slugs.

@stale stale bot added the stale label Apr 8, 2020
@parndt parndt removed the stale label Apr 8, 2020
@stale stale bot added the stale label May 20, 2020
@parndt parndt removed the stale label May 20, 2020
@stale stale bot added the stale label Jul 2, 2020
Repository owner deleted a comment from stale bot Jul 2, 2020
Repository owner deleted a comment from stale bot Jul 2, 2020
@stale stale bot removed the stale label Jul 2, 2020
Repository owner deleted a comment from stale bot Jul 2, 2020
@stale
Copy link

stale bot commented Aug 13, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Aug 13, 2020
@parndt parndt removed the stale label Aug 13, 2020
@parndt
Copy link
Collaborator

parndt commented Aug 13, 2020

I think I'm going to need help with this, please

@stale
Copy link

stale bot commented Nov 6, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 6, 2020
@parndt parndt removed the stale label Nov 6, 2020
@trappist
Copy link

@jeffblake I may have just encountered this, and it seems to be caused by a soft-deleted (paranoid) record causing the collision.

@stale
Copy link

stale bot commented Feb 3, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Feb 3, 2021
@parndt parndt added pinned and removed stale labels Feb 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants