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

Database error when adding a link without a protocol #122

Closed
newpdv opened this issue Apr 29, 2020 · 0 comments · Fixed by #125
Closed

Database error when adding a link without a protocol #122

newpdv opened this issue Apr 29, 2020 · 0 comments · Fixed by #125
Assignees
Labels
Bug Something isn't working
Milestone

Comments

@newpdv
Copy link

newpdv commented Apr 29, 2020

For example: "google.com"

Illuminate\Database\QueryException
SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'title' cannot be null (SQL: insert into links (is_private, title, description, url, user_id, icon, updated_at, created_at) values (1, ?, ?, google.com, 1, fab fa-google, 2020-04-29 00:11:42, 2020-04-29 00:11:42))

$link = Link::create($data);

@Kovah Kovah self-assigned this Apr 29, 2020
@Kovah Kovah added this to the v0.0.35 milestone Apr 29, 2020
@Kovah Kovah added this to To do in Issues & Support via automation Apr 29, 2020
@Kovah Kovah added the Bug Something isn't working label Apr 29, 2020
Kovah added a commit that referenced this issue Apr 29, 2020
This includes URLs without a proper protocol as they can't be correctly queried for the meta data.
Kovah added a commit that referenced this issue Apr 29, 2020
Move the HTML meta helper into a new class and refactor the actual parsing of title and description. The helper now uses one single call to get the HTML and then parses the title and description from it.
The helper also now handles invalid URLs correctly. This includes URLs without a proper protocol as they can't be correctly queried for the meta data.
@Kovah Kovah linked a pull request Apr 29, 2020 that will close this issue
@Kovah Kovah moved this from To do to In progress in Issues & Support Apr 29, 2020
@Kovah Kovah closed this as completed in #125 May 4, 2020
Issues & Support automation moved this from In progress to Done May 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants