Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#8 | 627792_cb_preprocess.patch | 3.37 KB | MGN |
Comments
Comment #1
MGN CreditAttribution: MGN commentedWhat 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?
Comment #2
MGN CreditAttribution: MGN commentedComment #3
ptoly CreditAttribution: ptoly commentedI 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!
Comment #4
MGN CreditAttribution: MGN commentedOk, 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.
Comment #5
MGN CreditAttribution: MGN commentedfixing the title
Comment #6
ptoly CreditAttribution: ptoly commentedThank you!
Comment #7
rootworkThanks, 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.
Comment #8
MGN CreditAttribution: MGN commentedThis 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.
Comment #9
MGN CreditAttribution: MGN commentedAny 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...
Comment #10
MGN CreditAttribution: MGN commentedTurns 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...
Comment #11
MGN CreditAttribution: MGN commentedI've committed patch in #8 to 6.x-2.x-dev for further testing.
Comment #12
capellicI 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.
Comment #13
MGN CreditAttribution: MGN commentedPlease test the current 6.x-2.x-dev and verify that it fixes the problem.
Thanks.
Comment #15
MGN CreditAttribution: MGN commentedIt 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?
Comment #16
MGN CreditAttribution: MGN commentedI 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.