Hi Alex,

I installed Leech and Localizer on a fresh 4.7.5.
I can define language for the feed AND for the published feed items, but the language is not passed automaticaly from the feed to the feeditems.

Localizer is a very good new internationalization module that works better than i18n and has a great support from it's developer.

It would be really great if you could help me with that and possibly following issues.

Thanks in advance!

CommentFileSizeAuthor
#6 leech.module.localizer_enabled.txt97.94 KBfunana

Comments

alex_b’s picture

funana,

I got no experiences so far with localizer and leech. Did you happen to try leech with i18n as well?

The point where you can make leech.module pass on language settings from feed to feed item is in _leech_news_save_items() (line 2045 leech.module) .

Look how og and taxonomy inheritance was implemented (line 2078 and line 2178 and following)

Just follow the example and copy the language properties from feed to feed-item like taxonomy or group properties are copied.

I would highly appreciate a patch :) Language support is crucial. Be sure to check out the right branch of leech (DRUPAL-4-7) with

cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib checkout -d leech -r DRUPAL-4-7 contributions/modules/leech
funana’s picture

Thank you Alex, I will try this tomorrow and give you feedback!

funana’s picture

Hi Alex,

I tried, but I'm just a simpleminded hacker, no developer and I fail with integrating this by simply copying the taxonomy style of passing and customizing it for leech. A friend of me will check it out later, but I would really appreciate your help in this!
If you need help with Localizer, Roberto will surely help you, he is very responsible and helpful.

Thank you.

Roberto Gerola’s picture

Hi.
Just send a modified version of leech module to funana.
If it works as expected, I'll prepare the patch.

Roberto

aron novak’s picture

Assigned: Unassigned » aron novak
Status: Active » Postponed (maintainer needs more info)

Can you explain to me what is required from leech to work w/ localizer correctly? The problem is that the user now have to set the locale for each feed items manually, isn't it?
Roberto : you mentioned modified version of leech? What's the expected behaviour from leech that have to be achieved?

Thanks,

Aron

funana’s picture

StatusFileSize
new97.94 KB

The problem is that the user now have to set the locale for each feed items manually, isn't it?

YES! Bingo. No matter what you define for the feed, the items are not in the language of the feed.

It should just pass the language from Feed to Items. Nothing more.

I attached our last version of Leech module where we tried to implement localizer. I would really appreciate your help in that. Seems to be an easy fix, but somehow it doesnt work...

Thanks a lot!!!

alex_b’s picture

funana, I won't be able to help you on that... I am simply too tied up here in other projects. I would totally appreciate a localizer patch for leech. Probably you can find sb. else to do that patch...

Alex

Roberto Gerola’s picture

I'll try to take another look at it.
I've downloaded the latest cvs version and see what I can do.
The first things that I see is that there are some SQL instructions that read
from node and leech tables that don't use any JOIN clause.
Is it correct ?

When try to apply its SQL rewriting code, the result SQL is incorrect due to the
lack of JOIN clause in the original SQL code.

alex_b’s picture

Roberto, correct, there is Selects across tables without using JOIN - against Drupal standards. This code is legacy from the original leech module I took over.

Roberto Gerola’s picture

Can I fix it ?

alex_b’s picture

Of course - that would be awesome.

funana’s picture

I love you guys :-)

hbfkf’s picture

What is the latest status of this issue? I think I have run into the same problem (Leech not using Drupal-proper MySQL statements). In my case this manifests itself like this:

user warning: Unknown column 'n.nid' in 'on clause' query: leech_form_alter SELECT DISTINCT(n.nid), n.title FROM node n, leech_news_feed f LEFT JOIN localizernode loc ON loc.nid=n.nid WHERE (loc.locale IN ('en','-') OR loc.locale IS NULL) AND ( f.nid = n.nid) in /var/www/apps/knowledge_framework/includes/database.mysql.inc on line 172.

This error occurs whenever I try to edit a news node created by Leech (clicking on the node's 'Edit' tab).

I have limited knowledge of Leech's internals but am willing to help resolving this issue. Has anybody of you already started working on it and could provide a patch as a starting point?

Kaspar

alex_b’s picture

I didn't move on this... to my knowledge no patches in regards to this topic went into leech so far.

funana’s picture

Is there still any hope for us? :-)

Hey Guys, any news on this topic?

alex_b’s picture

hi funana,

I don't plan to implement this - probably roberto does.

did you try to work around by creating a node template per language and set the language property in the node template php field?

funana’s picture

Hmmm. Great idea, I never thought of that... I will try that! :-)

funana’s picture

Alex,

it was a very good idea and sounded very logical to me, but... it didnt work :-(

Greetings,

Funana

alex_b’s picture

Can you post the code that was supposed to set the language property?