refinerycms-blog icon indicating copy to clipboard operation
refinerycms-blog copied to clipboard

Fix slug on save (Closes GH-485)

Open brigriffin opened this issue 5 years ago • 3 comments

Also encountering the annoying issue #485 where slugs are not generated and seeing that finally no one created a PR for it I decided to submit this one so things can get finally fixed. Credits go here to @imunteanu and @spotlessicode. A test covering this specific case should also already be available here I believe: https://github.com/refinery/refinerycms-blog/blob/684036e9efbea667b286a850e5028d3a53b578bf/spec/models/refinery/blog/post_spec.rb#L244

Thanks in advance for reviewing this PR.

brigriffin avatar Mar 22 '19 20:03 brigriffin

Any chance someone could take a look at my PR?

I also submitted recently issue #509 because the CI pipeline seems to be broken for this repo.

Let me know if there is anything I can help with. Thanks in advance for your time.

brigriffin avatar Apr 07 '19 13:04 brigriffin

Changing the method in our refinery app does raise a "stack level too deep" on validarion in case of missing attributes. I wonder if you can reproduce it by a manual test. Just keep title or body of a post blank.

kjoscha avatar Apr 16 '19 08:04 kjoscha

@kjoscha I can't reproduce this issue manually on my test installation. If I leave either the title or the body of a blog post empty I get respectively:

  • Title can't be blank
  • Body can't be blank

Which version of RefineryCMS are you using? and which version of Rails?

brigriffin avatar Apr 16 '19 18:04 brigriffin