#8 closed defect (bug) (invalid)
SQL error when editing link in Manage Links
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | critical | Version: | |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
Edit link form without data appears with the following is the error message above it:
Database error: [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near at line 3]
SELECT * FROM wp_links WHERE link_id =
Change History (13)
#7
@
21 years ago
- reproducibility changed from 90 to 30
- Resolution changed from 10 to 20
- Status changed from assigned to closed
Found the problem. The link ID was not being passed correctly for systems without register globals turned on. Just added this line: $link_id = $_GETlink_id?;
#9
@
21 years ago
$_GETlink-id???? I must be missing something... I can't see how that would help, the query uses "link_id".
Are you using 1.2 or a nightly?
#10
@
21 years ago
Ah you know what it is? It's a bug in a plugin that rewrites WP URLs to move from underscores to hyphens. The correct URL (in the CMS) has link_id, but the plugin rewrites it to link-id.
So you clicked on an 'edit' button and got this error? I can only reproduce this if I modify the query by getting rid of 'link_id'.