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

Article pane, failed inserts, given incorrect ID #163

Closed
ghost opened this issue Oct 4, 2014 · 2 comments
Closed

Article pane, failed inserts, given incorrect ID #163

ghost opened this issue Oct 4, 2014 · 2 comments

Comments

@ghost
Copy link

ghost commented Oct 4, 2014

From jukka.svahn@rahinaa.biz on April 05, 2012 19:02:45

On articles pane the saving to DB should carefully validated, in case of an error. In other words safe_insert() should be checked and made sure it doesn't return FALSE.

If it does return FALSE, the article wasn't saved and mysql_insert_id() will give an incorrect ID.

When this happens, user's following saves will either commit saves to incorrect article, form goes to oblivion, or the form is ignored gracefully.

Original issue: http://code.google.com/p/textpattern/issues/detail?id=159

@ghost
Copy link
Author

ghost commented Oct 4, 2014

From jukka.svahn@rahinaa.biz on April 05, 2012 10:14:29

Attached a patch. The patch checks used safe_insert() and safe_update() instances' statuses, and returns human-friendly message, branded as E_ERROR, on error. Simple few line addition.

Attachment: txp_article.php.r3709.patch

@ghost
Copy link
Author

ghost commented Oct 4, 2014

From r.wetzlmayr on April 18, 2012 01:15:26

Fixed in r3741 .

Status: Fixed
Owner: r.wetzlmayr
Labels: Component-Admin-side Milestone-4.5

@ghost ghost closed this as completed Oct 4, 2014
This issue was closed.
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

0 participants