I have OG Forums 6.x-2.x-dev (2009-Oct-14) installed on a multi site setup.
On the main site I don't see any problems.
However on the sub site only admin roles can get access, everyone else gets access denied when Custom Breadcrumbs are turned on.

I stepped through the modules (shutting off one by one) and it happens consistently when the main custom breadcrumbs module is turned on.

There is a similar issue on the OG Forums issues, having to do with menu_breadcrumbs: http://drupal.org/node/549542

CommentFileSizeAuthor
#8 627792_cb_preprocess.patch3.37 KBMGN
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

MGN’s picture

What custom breadcrumb configuration settings are you using (with only the base custom breadcrumbs module enabled)?

Do you have the problem when "Set the Home breadcrumb text on all pages" and "Use the menu structure to set the breadcrumb trail" options are disabled?

MGN’s picture

Status: Active » Postponed (maintainer needs more info)
ptoly’s picture

I was using API, Panels, Paths, Taxonomy, and Views (in other words, all of them).

That's what I meant when I said I stepped through all of them. I shut them off, one by one, and checked to see if I continued to get the access denied, which I did.

Settings:
Use the menu structure to set the breadcrumb trail - NO
Set the Home breadcrumb text on all pages - YES

NOW we are making headway :)

When I shut off the Set the Home breadcrumb text on all pages = NO, I stop getting the access denied!

MGN’s picture

Title: Custom Breadcrumbs causes Access Denied in OG Forums » Custom Breadcrum causes Access Denied in OG Forums
Status: Postponed (maintainer needs more info) » Active

Ok, so this is the same error as reported for menu breadcrumbs, originating with the use of hook_init to set the home breadcrumb on all pages. Right now, I don't have a fix for this, so don't use the option if you need og forum. I'll try to find another hook that could accomplish the same purpose without the unintended side affect.

MGN’s picture

Title: Custom Breadcrum causes Access Denied in OG Forums » Custom Breadcrumb option causes Access Denied in OG Forums

fixing the title

ptoly’s picture

Thank you!

rootwork’s picture

Thanks, ptoly, for doing that troubleshooting. I was experiencing the same issue and unchecking "Set the Home breadcrumb text on all pages" fixed it for me as well.

Subscribing so I know if there ends up being a fix at a future date.

MGN’s picture

Assigned: Unassigned » MGN
Status: Active » Needs review
FileSize
3.37 KB

This patch moves the code that was in hook_init into hook_preprocess. This should prevent the problems associated with calling menu_get_item() within hook_init. For further information see #599106: Reason for using hook_init? , #275622: Doesn't work for Views pages.

I have done some limited testing of this on a couple of live sites and I haven't been able to see a difference (which is good, because I don't use OG Forums and haven't had any of the problems reported by ptoly).

I would appreciate it if others could review and test this patch (against the latest 6.x-2.x-dev) and let me know if it solves the problem, hopefully without introducing any other problems. After you apply the patch be sure to go to admin/build/themes and save the theme configuration so the new hook_preprocess function can be properly registered.

MGN’s picture

Status: Needs review » Postponed (maintainer needs more info)

Any feedback on this? Or should I just commit to 6.x-2.x-dev for further testing? I've been running with these changes on a couple of live sites for weeks without problems now, and would like to move forward with this...

MGN’s picture

Turns out this patch also appears to fix another problem resulting from the use of hook_init. See #543506: Problem with tokens when using a custom_bredcrumbs_paths for details.

I would still appreciate it if someone could verify that this patch fixes the problem with og forum...

MGN’s picture

Status: Postponed (maintainer needs more info) » Fixed

I've committed patch in #8 to 6.x-2.x-dev for further testing.

capellic’s picture

I also had to uncheck "Use the menu structure to set the breadcrumb trail". I am using Custom Breadcrumbs 6.x-2.0-beta2. I didn't test the patch.

MGN’s picture

Please test the current 6.x-2.x-dev and verify that it fixes the problem.

Thanks.

Status: Fixed » Closed (fixed)

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

MGN’s picture

Status: Closed (fixed) » Postponed (maintainer needs more info)

It seems that part of this patch broke breadcrumb patterning after the menu structure. The patch in #796668: Use the menu structure to set the breadcrumb trail will revert part of the patch given in #10 to restore this feature.

Also, it seems that the problem with OG Forum was fixed without the patch in #10 anyway.

@ptoly is this still an issue for you? Have you updated to the latest version of OG Forum (looks like it was updated in March)? If so, could you also test the patch in #796668: Use the menu structure to set the breadcrumb trail to make sure it doesn't break OG Forum?

MGN’s picture

Status: Postponed (maintainer needs more info) » Fixed

I can't reproduce the problem that ptoly reported with current code from og, og forum and custom breadcrumbs patched with #796668: Use the menu structure to set the breadcrumb trail. That patch has now been committed to 6.x-2.x-dev. If you see a problem, please reopen this issue.

Status: Fixed » Closed (fixed)

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