Hello. We are reporting a similar problem as described in https://www.drupal.org/node/2681715#comment-10990959 for 2.60-rc1. In select areas of our OA site, various menu links provide duplicate base URL locations. (A mock-up is included in the image attached.) In most cases, things are fine, but clicking on the "Space home" invariably produces the error. Clean URLs are on. Changing themes does not help.

We have spent much of the day experimenting with almost endless combinations of .htaccess and "settings.php" settings, plus one of our coders scoured the database for any evidence of an errant or module-written URL, and we haven't come across anything. Upon correcting the incorrect URL string in the browser address bar, OA provides the correct page instantly. For us, the main problem is the "Space home" button/tab, while the other links in that menu function normally. There were 2 or 3 other links elsewhere in the site which produce the "directory-doubling" but we don't see a pattern.

We have other Drupal installations running just fine with relative URLs, and we can't figure this one out. (And in building custom configurations in OA which clearly use relative URLs, we can see that relative links appear to be Ok at large.)

If anyone has any ideas on what we should specifically be looking for (or modifications to make) we would sure appreciate your help. For now, we're using other means to get to the same pages, but the "Space home" menu tab is an important convenience, along with several others.
Many thanks.

CommentFileSizeAuthor
duplicated-directory.jpg55.86 KBprairiedog

Comments

prairiedog created an issue. See original summary.

prairiedog’s picture

Issue summary: View changes
mpotter’s picture

Status: Active » Fixed

I think I found this!!

There are two Drupal theme hooks: theme_links and theme_menu_link that have a "href" parameter. However, this "href" isn't really a "url", it's a "path". This parameter is passed to the l() function in Drupal, which calls the url() function to generate a full url.

But there were multiple places in Open Atrium where the "href" parameter was being set by a call to the url() function. Thus, in some cases the url() function was being called *twice*. And I believe this could cause the duplicate base-url path that you are experiencing.

I have pushed the following commits to modules to fix this:
oa_core: 1a84d16 (urls in Space Member toolbar for Member list, Bulk manage and for each user link)
oa_toolbar: 360734d (new user config links in user badge, Space Home link in space menu)
oa_contextual_tabs: 4203af8 (new space config toolbar task links)

I also added comments to the theme_links and theme_menu_link doc pages to remind people these are "paths" and not "href" urls.

Let me know if this fixes the problem for you and if you find any other links that do this. Your hint about the Space Home link in the space menu is what helped me track this down.

mpotter’s picture

btw, not sure why you created a new issue for this and posted exactly the same thing you said in issue #2681715: Modern Theme Toolbar Duplicate Path but that made it very confusing for me as the maintainer as well as for other people following the other issue.

prairiedog’s picture

Hello Mike, and so glad to hear you have made such progress on this. We will proceed with the updates and check everything out. We apologize for the duplicate issue entries. (Pulling an all-nighter made our team a bit "punch drunk.") We tried to mention in the other post that we were going to move the issue to the right version (2.60 vs. 2.60-rc1). We see now that we should have deleted the other post altogether. Sorry for the clumsiness on that. The last thing we need to do is confuse the wizards that are keeping all this in motion!

Thanks again and we will report back.

prairiedog’s picture

We are very happy to report that we applied the commits to the modules you posted, Mike, and the problems have vanished. OA has not produced any URL parsing errors, and the "Space Home" tab is functioning perfectly. Thank you for your expertise on this. If we do find something unexpected, we will reopen the issue. Cheers.

jbrundle’s picture

Where is the fix posted for this problem? I would like to apply it as well

prairiedog’s picture

See number 3 above... commits for the modules listed. They're on the respective commits pages. Worked beautifully for us.

jbrundle’s picture

I applied the patches and they worked for me also, thanks.

Status: Fixed » Closed (fixed)

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