Updating to og.module version 1.53.2.31 on the 4.6 branch and running update-og.php over a working og installation results in all users being unsubscribed from all groups. The new code may be cleaner, but the update procedure is really not a good idea...

Comments

Bèr Kessels’s picture

are you updating to HEAD or to 4.6?

lcd_47’s picture

I'm upgrading from version 1.53.2.30 to 1.53.2.31. Both are on the DRUPAL-4-6 branch.

moshe weitzman’s picture

did the update script report any problems? what is in your og_uid table? i'll fix the update script as soon as we identify the bug.

lcd_47’s picture

I had to comment out the call to drupal_bootstrap() (there is no such thing in 4.6), but apart from that the update script didn't report any error.

The table og_uid is empty; it was empty to begin with. The three new fields seem to have been added successfully.

Perhaps relevant to the problem, the public posts in each group are also no longer visible after the upgrade.

moshe weitzman’s picture

Status: Active » Fixed

sory, i left a botstrap call that only happens in 4.7. is fixed now. please reopen if more issues persist.

lcd_47’s picture

Status: Fixed » Active

Well, like I said, the main issues are not related to the botstrap call, or to the upgrade procedure itself. The main issues are that, after a successful upgrade:

(1) all users are left unsubscribed from all groups;
(2) no posts are visible when browsing group blogs anonymously.

After that, revering to the old og.module is not enough to get back the functionality. The database has to be restored from backups.

colorado’s picture

I'm using drupal 4.6.5 on remotely-hosted unix/php (v4.4.1)/mysql (v4.0.25)

I just updated to og.module version: 1.53.2.32 2006/01/19 06:15:42

I also updated the og_uid table, confirming addition of the three new fields, and ran update-og.php.

I have checked the Public box on the node pages, and access control has all node content viewable by anonymous users.

I want all the content in all of the groups to be viewable by anonymous, so I tried both of the following options on the og groups settings:

Visible within the targeted channels and on other pages
Visibility chosen by author/editor using a checkbox on the posting form. Checkbox defaults to Public.

It seems no matter what I do I cannot make any group content viewable to anonymous users.

colorado’s picture

UPDATE:

I figured out that if (and only if) I set access permissions for anonymous users to Administer Nodes, only then can they view nodes. It is the same with authenticated users.

moshe weitzman’s picture

Priority: Critical » Normal

I found a bug for 'anon users can't view any nodes' and just commtited a fix to 4.7 and HEAD. The operation of a nodeapi hook changed without me knowing .. I still don't know what the problem might be on 4.6. More information welcome.

lcd_47’s picture

What kind of information would be relevant here?

The function og_list_groups_page() and the tables it depends on are left alone during the upgrade. Yet, the function produces different results before and after the upgrade: the new number of subscribers for each group is 0. This seems to point to a global initialization problem. I know too little about Drupal internals to come up with a more meaningful hypothesis for now.

mcg’s picture

I'm not gonna be much help here other that to add a "me too". All users ended up unsubscribed from all groups after the upgrade. I can't upgrade to 4.6 till this is resolved.

lcd_47’s picture

Some more information. I tried upgrading from og.module version 1.53.2.30 to 1.53.2.48, this time using og-update-20060206.php. Users are still left unsubscribed from all groups, but after re-subscribing them manually everything seems to behave normally.

A hint to what's going on might be provided by this: I accidentally re-run og-update-20060206.php after re-subscribing some users to their groups. The (frustrating) result was that all users were again unsubscribed from all groups.

moshe weitzman’s picture

Status: Active » Closed (fixed)

i've made some bug fixes so feel free to try again. i'm closing this issue for now. please reopen it if you have problems again.

lcd_47’s picture

Status: Closed (fixed) » Active

Ok, I tried again upgrading from og.module version 1.53.2.30 to 1.53.2.52. This time all users have been correctly migrated to the right groups.

However, browsing anonymously the home pages and the blogs of the groups doesn't show any posts.

On a side note, I also had to uncomment the three ALTER TABLE lines at the beginning of og-update-20060211.php, but aside from that the upgrade went smoothly.

jun’s picture

Not sure this is related but I just updated from og 45 to og 56 and I had to update the database manually because there was a "og_group" realm which seems to have been replaced by "og_public", "og_subscriber" and "og_all". This prevented me from seeing the groups correctly. So updated the database manually using:

UPDATE node_access SET realm = 'og_all' WHERE realm = 'og_group';

Maybe this is related to your issue?

I hope this will help someone.

Peace,

Jun.

moshe weitzman’s picture

jun - you have to run an update script when you change versions. the script is in the package.

moshe weitzman’s picture

Component: Code » og.module
Status: Active » Fixed

remember, a patch is required for node_access table. see enclosed file.

Anonymous’s picture

Status: Fixed » Closed (fixed)