#23066 closed defect (bug) (invalid)
WordPress 3.5 Duplicate Entry
Reported by: | chriscct7 | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.5 |
Component: | Unit Tests | Keywords: | has-patch |
Focuses: | Cc: |
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)
#3
@
12 years ago
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
#4
@
12 years ago
I've seen this happen as well after upgrading to 3.5, though I don't recall if the error was exactly the same.
#5
@
12 years 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
#8
follow-up:
↓ 17
@
12 years ago
@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
#10
follow-up:
↓ 13
@
12 years 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
#13
in reply to:
↑ 10
;
follow-up:
↓ 14
@
12 years 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.
#14
in reply to:
↑ 13
;
follow-up:
↓ 16
@
12 years 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.
#15
@
12 years 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
#16
in reply to:
↑ 14
@
12 years 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.
#17
in reply to:
↑ 8
@
12 years 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.
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.