Skip to content

[Docs] Add missing if statement to guide on slug generation#8554

Merged
derrickmehaffy merged 1 commit intostrapi:documentationfrom
walsquared:Walsker-patch-1
Nov 3, 2020
Merged

[Docs] Add missing if statement to guide on slug generation#8554
derrickmehaffy merged 1 commit intostrapi:documentationfrom
walsquared:Walsker-patch-1

Conversation

@walsquared
Copy link
Copy Markdown

Description

After following this guide, I was receiving server errors in my app when attempting to publish content whose content type had an automatically generated slug. I found that the lack of if statement generates runtime errors.

What does it do?

I added an if statement to the code snippet.

Why is it needed?

Generates errors on other events that invoke the lifecycle method.

Related issue(s)/PR(s)

N/A

@walsquared walsquared requested a review from a team as a code owner November 2, 2020 21:24
derrickmehaffy
derrickmehaffy previously approved these changes Nov 2, 2020
Copy link
Copy Markdown
Member

@derrickmehaffy derrickmehaffy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@derrickmehaffy derrickmehaffy requested review from a team and lauriejim November 2, 2020 22:02
The lack of if statement generates runtime errors when following this guide.

Signed-off-by: Walsker <walsker@walwal.me>
@walsquared
Copy link
Copy Markdown
Author

Followed your bot's instructions to signoff my commit, ended in a --force-with-lease push.
image

@walsquared walsquared requested review from derrickmehaffy and removed request for a team November 3, 2020 20:33
Copy link
Copy Markdown
Member

@derrickmehaffy derrickmehaffy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@derrickmehaffy derrickmehaffy merged commit dc6c513 into strapi:documentation Nov 3, 2020
hdeadman pushed a commit to hdeadman/strapi that referenced this pull request Nov 12, 2020
The lack of if statement generates runtime errors when following this guide.

Signed-off-by: Walsker <walsker@walwal.me>
petersg83 pushed a commit that referenced this pull request Nov 13, 2020
The lack of if statement generates runtime errors when following this guide.

Signed-off-by: Walsker <walsker@walwal.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants