12
Vote

doesn't work in Orchard 1.7

description

This module doesn't work in Orchard 1.7.

comments

juFo wrote Aug 5, 2013 at 8:35 PM

indeed it doesn't work. Can't select the widget.

mgesing wrote Aug 7, 2013 at 7:58 PM

Orchard.Environment.Extensions.ExtensionManager: WARN - No suitable loader found for extension "Orchard.CulturePicker"

juFo wrote Aug 11, 2013 at 12:16 PM

any id when this will be fixed?

wst wrote Aug 12, 2013 at 8:00 AM

Could use also a fix for this module because there is no good alternative.

Funbit wrote Aug 26, 2013 at 6:53 AM

Please fix the issue... This is a must have module for any serious site!

santo2 wrote Aug 27, 2013 at 8:40 AM

pretty please? :)

ermakovich wrote Aug 27, 2013 at 10:29 AM

Hi guys,

Let me first of all say SORRY for the delayed response.

Orchard architecture changes very rapidly with each release, making modules like CulturePicker incompatible each time. I will do my best to provide a new release compatible with Orchard 1.7, but this project currently has the lowest priority for me, so I can't tell when it will happen.

It would be great if somebody could contribute to the project by submitting a pull request...

Best regards,
Sergey Ermakovich

graycrow wrote Sep 4, 2013 at 9:10 AM

Well, I don't know how to make pull request, but in order to fix this issue in 1.7 it's necessary to change one line in LocalizableMainMenuNavigationFilter.cs. Instead of using Orchard.Core.Navigation.Models put using Orchard.ContentPicker.Models;. This is because ContentMenuItemPart has been removed from Orchard core. This fix however probably will break compatibility with 1.6.

ermakovich wrote Sep 6, 2013 at 7:45 AM

@graycrow, Thanks! This fixes the compilation issue and now widget is available for selection. However there is an issue with LocalizableHomeProvider. It causes Menu item corresponding to the home page to be inactive when we are on the home page.

ermakovich wrote Sep 6, 2013 at 7:47 AM

  • I meant LocalizableHomeController and "HomePageRedirect" feature in general.

armanforghani wrote Sep 6, 2013 at 6:06 PM

Yes, Orchard 1.7 has new feature to highlight selected path in menu system and this issue breaks it.

jonp123 wrote Sep 8, 2013 at 9:52 PM

To note it cause I haven't fully tested or made a pull request:

The above reference change will get the culture picker working. The additional issue is that the 'home' page a menu will not be highlighted when its the current page. The issue is that the culture picker has a route to "/" and calls a controller to figure out what language's homepage to redirect to. Because of this, the NavigationHelper.SetSelectedPath, that is called from the MenuWidgetPartDriver.cs, cannot do the following comparison
 if (RouteMatches(menuItem.RouteValues, currentRouteData)) {
                        match = true;
}
because one side is the route to the LocalizedHomeController rather than to the content item itself. This only affects the homepage cause its the only route intercepted.

The fix would be to find a way to do the same logic as LocalizedHomeController without using a route/controller. Don't have time to figure that out but thought I'd leave a more detailed description for someone that does.

As well I don't think the logic in LocalizableMainMenuNavigationFilter is required anymore. The menu itself (Orchard.Core.Navigation.Drivers.MenuWidgetPartDriver) will now localize itself and since 1.7 is a breaking change their is no need for backward compatibility. I commented out the contents of Filter(..) and added only
            foreach (MenuItem menuItem in menuItems)            
            {
                yield return menuItem;
            }
still testing but it seems to be fine (and if so, it should be possible to remove the source for the whole filter).

wst wrote Sep 10, 2013 at 7:38 AM

any idea when these fixes will become available?

ermakovich wrote Sep 11, 2013 at 11:58 AM

Hope to release a new version on this weekend.

jonp123 wrote Sep 14, 2013 at 1:17 AM

ermakovich if you look at RM.Localization LocalizedHomeRoute.cs there is an example of how to get rid of the route/controller used to localize the homepage. The example however does not fix the highlighting of the home page because although now its comparing content item patterns at the route level .. it is still comparing the default culture content item to the translated content item.

Jetski5822 wrote Sep 27, 2013 at 11:18 AM

How is this looking? Have you got a module for 1.7 yet?

nesteruk wrote Oct 7, 2013 at 9:50 AM

Ping... any time this will be ready? Also, is there some quick fix right now that does not require rebuilding from source?

juFo wrote Dec 7, 2013 at 2:30 PM

ping... any update? any news?

Martinelly wrote Dec 8, 2013 at 8:09 AM

I moved to the rm localization module.
It has a culture picker. And it works with 1.7, 1.7.1, 1.7.2

DeejayRaoul wrote Apr 17 at 8:03 AM

Is there a way to filter content/blogs with the RM localization module?
It works for menu and homepage. But ist still shows any content/list regardless of their culture?