I've found that having lid 0 in the table will cause problems when editing the owner. (the location getting "stuck" on the old one, any changes getting assigned a new lid each time, and so on...) There's several places where $location['lid'] is being tested instead of isset($location['lid']). Those either all need to get fixed, or lid 0 needs to be forbidden in the location table..

Calling db_next_id() during installation should bump lid to 1.

Thoughts?

Comments

geodaniel’s picture

This sounds like an important thing to fix. Does it only affect the first ever location added?

WebWeasel’s picture

I've seen this issue also. I would be more interested in fixing the problem rather then the workaround. That could just lead to additional issues.

bdragon’s picture

This would entail making sure no code ever does an if(!$lid) to check whether there was a location or not, since 0 casts to false...

drupalfan2’s picture

Can you solve this problem now?
How long will it take to have a new version without error?

I have the same problem, look here:
http://drupal.org/node/159203

PLEASE repair this an tell me how long we all will have to wait for an error free version!!!
Thanx.

bdragon’s picture

Version: 6.x-3.x-dev » 5.x-3.x-dev
Component: Code » Fixed in L3
Status: Active » Closed (fixed)

This is fixed in 3.x.