domain_blocks.domain_id is type int but its default 0 is PHP type string

Comments

nonsie’s picture

StatusFileSize
new898 bytes

This patch should fix it

choy’s picture

Issue tags: +domain_block

the patch doesn't work - domain_block still cause site crash to anonymous users
error message with schema: domain_blocks.domain_id is type int but its default 0 is PHP type string

skizzo’s picture

Version: 7.x-1.0 » 7.x-2.0

Only after installing the "schema" module (just out of curiosity), I see the reported warning at admin/structure/schema (not in status report)

domain_blocks.domain_id is type int but its default 0 is PHP type string

Applying the patch to 7.x-2.0 the warning disappears but I get the following

Notice: Undefined index: warn in schema_compare() (line 614 of /var/www/drupal/sites/all/modules/schema/schema.module).
Warning: Invalid argument supplied for foreach() in schema_compare() (line 615 of /var/www/drupal/sites/all/modules/schema/schema.module).
agentrickard’s picture

Status: Active » Needs work

That is a schema module bug.

This patch would also need an update hook.

clearbrook’s picture

Hey guys. I was only looking at the 7.x-3.0-alpha1 branch, so I did not see what you were looking at here. nonsie pointed me to you guys. I will be banging on this, and I am as raw as it gets, but I do understand the need for an update hook quite clearly now. And there are likely other problems I will run into if I try to do anything other than an Alpha1 to Alpha2 update with as much as is in the mix already on this branch.

BTW, my tentative attempt is on:

http://drupal.org/node/1964638

I am going to look at what you guys are doing. It might shed some light on it for me.

(and Alpha1 to Alpha2 on the 3.x branch is not a complete fix, either, but all I am going to tackle on my first attempt)

clearbrook’s picture

Hmmm. In looking at your patch, I see that what I am dealing with is already dealt with at this point in this branch. And the problem you have here is already corrected on 3.x Alpha1 (although I don't know about the update hook) So should I consider an update hook to cover from Alpha1 to Alpha2 with my problem (which is very similar to yours) on 3.x good enough?

nonsie’s picture

Update in this context means converting the field for those sites already using Domain Blocks. The patch as it is only helps those who have not yet installed the module.

nonsie’s picture

Version: 7.x-2.0 » 7.x-2.x-dev
Status: Needs work » Needs review
StatusFileSize
new3.12 KB

Here's a patch for 7.x-2.x-dev that includes the original path from #1 as well as an update for those sites that already have this module installed.
Also fixes some minor style/instruction issues.