Got this error on modules page when i reenabled 'Domain Access' singly and first after upgrade

# user warning: Duplicate entry '1-0-domain_id' for key 1 query: INSERT INTO domain_access (nid, gid, realm) VALUES (1, 0, 'domain_id') in /home/**/public_html/sites/all/modules/domain/domain.module on line 959.
# user warning: Duplicate entry '40-0-domain_id' for key 1 query: INSERT INTO domain_access (nid, gid, realm) VALUES (40, 0, 'domain_id') in /home/**/public_html/sites/all/modules/domain/domain.module on line 959.
# user warning: Duplicate entry '41-0-domain_id' for key 1 query: INSERT INTO domain_access (nid, gid, realm) VALUES (41, 0, 'domain_id') in /home/**/public_html/sites/all/modules/domain/domain.module on line 959.
# user warning: Duplicate entry '42-0-domain_id' for key 1 query: INSERT INTO domain_access (nid, gid, realm) VALUES (42, 0, 'domain_id') in /home/**/public_html/sites/all/modules/domain/domain.module on line 959.
# user warning: Duplicate entry '43-0-domain_id' for key 1 query: INSERT INTO domain_access (nid, gid, realm) VALUES (43, 0, 'domain_id') in /home/**/public_html/sites/all/modules/domain/domain.module on line 959.
# user warning: Duplicate entry '73-0-domain_id' for key 1 query: INSERT INTO domain_access (nid, gid, realm) VALUES (73, 0, 'domain_id') in /home/**/public_html/sites/all/modules/domain/domain.module on line 959.
# user warning: Duplicate entry '113-0-domain_id' for key 1 query: INSERT INTO domain_access (nid, gid, realm) VALUES (113, 0, 'domain_id') in /home/freehost/public_html/sites/all/modules/domain/domain.module on line 959.

Please proceed to ...Rebuild permissions ..page

And after rebuilding permissions its fine.

Comments

nirvanajyothi’s picture

Title: Error on upgrade to D6.4 ,OK after rebuilding permissions. » Error on upgrade to Drupal 6.4

may be due to my faulty upgrade...please wait till tomorrow when i can try upgrading again....

nirvanajyothi’s picture

Title: Error on upgrade to Drupal 6.4 » Error on upgrade to Drupal 6.4.

Same error occured on 2 subsequent trials.So i think its a valid error after uploading to Drupal 6.4

I have installed as per UPGRADE.txt and the same way i did it for 6.3.(have transferred sites folder with settings.php used for 6.3 site to root dir )

The errors (in Duplicate entry...955 and 959 ) occur on Modules page after i re-enabled Domain access (either singly or along with other Domain modules in the pack.)
The last line of the red error box was asking to ''Rebuild Permissions' '

And.... the errors disappeared from modules page after 'Rebuild Permissions' performed.

The Log entries showed events from 29033(error on 955) after re-enabling the module with the same 2 errors alternating in each event upto to event-29140(error on 959)

a.

Duplicate entry '1-0-domain_site' for key 1 query: INSERT INTO domain_access (nid, gid, realm) VALUES (1, 0, 'domain_site') in /home/**/public_html/sites/all/modules/domain/domain.module on line 955.

and

b.

Duplicate entry '113-0-domain_id' for key 1 query: INSERT INTO domain_access (nid, gid, realm) VALUES (113, 0, 'domain_id') in /home/**/public_html/sites/all/modules/domain/domain.module on line 959.

c.
The Logentries still show the error

parse_url(http://) [function.parse-url]: Unable to parse URL in /home/**/public_html/sites/all/modules/domain/domain.module on line 590.

...after every cron run which I had reported earlier at http://drupal.org/node/286222 .Found many similar terms on 6.4 release notice http://drupal.org/node/295065 --> http://drupal.org/node/283806 .No idea whether these can be releated.Any way the parse url error is shown on 6.4 too.

Other errors seen in administration
a.Under the affiliated content heading in admin page only the last subdomain that was cretaed with DA (domain id 31)is listed.(all subdomains are active)

b.All content has been assigned to all affiliates.(The Domain Source settings are preserved and alright.)

c.Could not reassign content to select domains using single or Batch upadating menthod.The content still was shown as affiliated to all sites after updating options.

And...when i checked domain.module the lines related to errors shown are
955
db_query("INSERT INTO {domain_access} (nid, gid, realm) VALUES (%d, %d, '%s')", $nid, 0, 'domain_site');

959
db_query("INSERT INTO {domain_access} (nid, gid, realm) VALUES (%d, %d, '%s')", $nid, 0, 'domain_id');

Have put the site offline in 6.4 as it is.Can give more datails if needed.Will go back to 6.3 later.

nirvanajyothi’s picture

i have not changed the database during the 2 repeated upgrade trials ...can this be a reason?

agentrickard’s picture

The original error is related to http://drupal.org/node/280908 and has no effect on the operation of your site. It is a bug in the module enable sequence that needs to be corrected, however.

I cannot track multiple issues as listed in #2 -- these need to be separated for clarity -- and I have not tested anything on Drupal 6.4 yet.

nirvanajyothi’s picture

k.the errrors a,b in #2 are details of the original error.

(and c about parse()url error had been reported and closed as a minor issue earlier at http://drupal.org/node/286222 .And so dont want to duplicate it.)

Adding the main errors again....

The main error still seems to be severe than http://drupal.org/node/280908 which i got when i upgreaded to D6.3.There were no erros shown on enabling Domain Access after upgrade and the content could be reassigned to affiliates.
But with Drupal 6.4 upgrade

0.The old error was the content loosing its affiliation.Now maybe because i started using Domain Source the urls of posts have been returned to affiliations in old site after rebuilding permissions.But they are still getting 'affiliated to all sites' after Rebuild .So that error as you said is still there.

1.Cant reassign content using Domain source now and its is affecting the site as all content is displayed on all domains.ie after selecting appropriate domains for a content and clicking Upadate no change is shown to the list of affiliates alongside that content.

2.Only the last subdomain i created is being listed under ths affiliate content heading of admin page...and 1.Cant reassign... is applicable to content of this subdomain too.

How do i fix this Ken?Should i try going back to Drupal6.3?
And mine unfortunately is a production site...so any advice will be a relief...

(The modules i had been using for drupal 6.2 were Domain Access,Domain Content and Domain Config. and in 6.3 i had started using Domain Source too)

agentrickard’s picture

The first problem is caused by turning the module off during the upgrade process.

I do not understand the second two issues. Try clearing the cache.

Downgrading to 6.3 is not a good option.

nirvanajyothi’s picture

in admin page under

Affiliated content

* source.domain.com content

only this subdomain is showed of the 6 ones i have and the primary domain is not show too.

(Have checked Domain settings and primary domain is still the main site,and is alright there)

agentrickard’s picture

Right, this might simply be a menu cache issue. Are all your domain still shown at admin/build/domain/list ?

Re-saving the modules page should clear the menu cache.

nirvanajyothi’s picture

HOOOHA!

Have been fooling myself with a part of it...ie I was selecting new option under 'Affiliate publishing options' and clicking 'update options' with 'Publish' selected instead of setting it to 'change affiliate publishing options'

Sorry hadnt used Domain source for sometime.

The above one of Affiliated content is the only one that persists.

The affiliate publishing options for all sites are visible in my navigation but in admin page only source.domsin.com is shown under 'Affiliated content' .

May be related to something from my site configuration side.will report when i find it.I had set the Create content block visible only on source.domain.com modifying the php code you had given on an earlier occassion.So that is a something i may need to follow.
And there is only this sites name shown on http://www.domain.com/admin/domain/content or http://source.domain.com/admin/domain/content

Thank you Ken.

Please solve the Rebuild Permissions bug soon.It just gave a bad day...

nirvanajyothi’s picture

SOLVED.

The links of missing sites had shifted away from under 'Affiliated content' menu when i checked out Navigtion...(admin/build/menu-customize/navigation)

All sites other than source.domain.com had been shifted down ....When i dragged them back under affiliated content....all the subdomians started displaying under 'Affiliated contnet' in admin page .
So finally the site is back n robust after a chilling 6.4 upgrade!

(I still dont know how the Navigtion menu got rearranged..didnt do anything to it after upgrade.)

Also
The site seems to be running smooth.So...
Isnt it ok to continue with the same database and core inspite of getting this error and that I have upgarded twice on the same old database?

Please close this.And you may also want to mark this as a duplicate of Rebuild permissions error.Thank you.

agentrickard’s picture

Title: Error on upgrade to Drupal 6.4. » Remove {domain_access} entries from domain_enable()
Assigned: Unassigned » agentrickard

Well, the duplicate key errors need to be corrected -- though they should have no effect other than generating those error messages.

I suspect an issue on menu rebuild -- but if you customized the menu, I don't see what can be done about that.

Changing title to reflect the patch that needs writing.

agentrickard’s picture

Status: Active » Patch (to be ported)

Committed to HEAD.

We only try to update {domain_access} now if the table is empty on install.

nirvanajyothi’s picture

k.So it was not a big deal.hmm...Should have tried to consult you before repeating the upgrade after getting that error...there were way too many errors in the log entries...so i got really scared!
i should be more careful next time around...

Thank you

agentrickard’s picture

Status: Patch (to be ported) » Fixed

Fixed in 5.x

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.