#23066 closed defect (bug) (invalid)
WordPress 3.5 Duplicate Entry
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Unit Tests | Version: | 3.5 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | chriscct7@…, pippin@…, ratilal.sunny@… |
Description
WordPress 3.5 MU when running PHP 5.2.17/5.3.x/5.4.x seems to have some duplicate install code.
Detected by Travis-CI.
Example build where error is present:
https://travis-ci.org/chriscct7/Easy-Digital-Downloads/jobs/3855494
3/4 of the way down you'll find the following:
Installing network… Installing sites… WordPress database error Duplicate entry '1' for key 'PRIMARY' for query INSERT INTO `wp_terms` (`term_id`,`name`,`slug`,`term_group`) VALUES (1,'Uncategorized','uncategorized',0) made by wp_install, wp_install_defaults WordPress database error Duplicate entry '1-category' for key 'term_id_taxonomy' for query INSERT INTO `wp_term_taxonomy` (`term_id`,`taxonomy`,`description`,`parent`,`count`) VALUES (1,'category','',0,1) made by wp_install, wp_install_defaults
Attachments (9)
Change History (28)
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
I've seen this happen as well after upgrading to 3.5, though I don't recall if the error was exactly the same.
comment:5
sunnyratilal — 6 weeks ago
- Cc ratilal.sunny@… added
- Resolution invalid deleted
- Status changed from closed to reopened
I've fixed this bug: on MS install, the Unit Tests were calling the install script twice. I've amended the script and you can find it my repo: https://github.com/sunnyratilal/WordPress-Tests
comment:6
sunnyratilal — 6 weeks ago
- Keywords dev-feedback added
- Component changed from Upgrade/Install to Unit Tests
- Keywords has-patch added
@nacin Still working on figuring out how to get the .patch and .diff files, but in the meantime, the commit is: https://github.com/sunnyratilal/WordPress-Tests/commit/3400b823567ecd4cdefdf59866bb245a8fc3121b
comment:9
SergeyBiryukov — 6 weeks ago
- Milestone set to Awaiting Review
comment:10
follow-up:
↓ 13
chriscct7 — 6 weeks ago
Okay they are up. FYI not sure if a Trac limitation but raw .diff/.patch files are locking up the Trac server so I postfixed the files with .txt
comment:11
markoheijnen — 6 weeks ago
If I seeing ti wrong. Aren't you now always set it as a multisite installation?
comment:12
sunnyratilal — 6 weeks ago
Oh yeah, whoops, will get that fixed up. Thanks.
comment:13
in reply to:
↑ 10
;
follow-up:
↓ 14
SergeyBiryukov — 6 weeks ago
Replying to chriscct7:
FYI not sure if a Trac limitation but raw .diff/.patch files are locking up the Trac server so I postfixed the files with .txt
Generally, patches should be uploaded with .diff or .patch extension for proper highlighting.
See also http://scribu.net/wordpress/svn-patches-from-git.html.
comment:14
in reply to:
↑ 13
;
follow-up:
↓ 16
chriscct7 — 6 weeks ago
Replying to SergeyBiryukov:
Yeah I did try that, but Trac literally locked the Database for 30 seconds every time I did that.
Replying to chriscct7:
FYI not sure if a Trac limitation but raw .diff/.patch files are locking up the Trac server so I postfixed the files with .txt
Generally, patches should be uploaded with .diff or .patch extension for proper highlighting.
See also http://scribu.net/wordpress/svn-patches-from-git.html.
comment:15
chriscct7 — 6 weeks ago
Ok someone should check me on this. Merged the diff from 3 commits by using a starter and ender tag. Made patch/diff by using git bash:
Diff:
$ git diff Starter Ender -- > fourth_try.diff
Patch:
$ git checkout Ender
$ git format-patch Starter --stdout > fourth_try.patch
Starter is commit:
https://github.com/chriscct7/WordPress-Tests/commit/3400b823567ecd4cdefdf59866bb245a8fc3121b
Ender is commit:
https://github.com/chriscct7/WordPress-Tests/commit/f4e566e388e0b218dc1abf1cdd1de48370816967
comment:16
in reply to:
↑ 14
SergeyBiryukov — 6 weeks ago
Replying to chriscct7:
Yeah I did try that, but Trac literally locked the Database for 30 seconds every time I did that.
Probably unrelated. I just got "OperationalError: database is locked" when submitting a comment.
fourth_try.diff looks proper, however still doesn't apply. Your copy of the repo appears to be out of date. bin/install.php was moved to includes/install.php in [1100/tests], and there are other changes in the file as well.
comment:17
in reply to:
↑ 8
rmccue — 6 weeks ago
Replying to chriscct7:
@nacin Still working on figuring out how to get the .patch and .diff files, but in the meantime, the commit is: https://github.com/sunnyratilal/WordPress-Tests/commit/3400b823567ecd4cdefdf59866bb245a8fc3121b
Just FYI, you can append .diff to the URL to get a diff for it. The only thing that then needs to be changed is to remove a/ and b/ from each path.
comment:18
sunnyratilal — 7 days ago
- Resolution set to invalid
- Status changed from reopened to closed
comment:19
SergeyBiryukov — 7 days ago
- Keywords dev-feedback removed
- Milestone Awaiting Review deleted

The problem here seems to be that a multisite switch is not occurring before the test suite installs additional sites. But, for this and other reasons, the test suite no longer installs any sites beyond the first one.