A few days ago I applied the i18n 7.x-1.5 update.
As a result my FAQ's page is showing now the faq's questions and answers in the original language (Dutch) and two translations (French and English) all together one after another in the same window and not just the current (selected) language.
See also http://drupal.org/node/1543416 where the author of the i18n module blames it on the Views module (and hence the FAQ module which uses also Views).
In Views I have a filter set: "Field language: Current user's language". That worked great till I updated i18n.
Can this issue be fixed soon, please?
Comments
Comment #1
redseujacComment #2
stella commentedWell if you're using the supplied Views that come with the FAQ module and if the problem is with Views, then there's not much I can do for you here. Did you try JGO's suggestion from comment #10 in that issue? http://drupal.org/node/1543416#comment-5920280 Did that work for you?
On the other hand, if you're using the built-in page that FAQ module provides at /faq-page, then that's different and I'd need to look into it further.
Comment #3
stella commentedUpgraded to i18n-7.x-1.5 and am having the same problem in the non-Views listing, see my comment at http://drupal.org/node/1543416#comment-5935058 Need to wait for feedback to that.
Comment #4
redseujacNot sure what you mean exactly in post #2, when you write about the "built-in page that the FAQ module provides at /faq-page".
When I installed the FAQ module this created automatically a View called FAQ with different possibilities. I thought it was there one had to set up some filters to let the FAQ module work properly in/with a multilingual site.
Of course my page "Frequently Asked Questions" and its translations are referring to the node "/faq-page", but that is not enough to make the thing working properly in a multilingual environment, isn't it?
Maybe I'm missing something? If so, I would be grateful if you could explain me more in detail.
Best regards
Jacques
Comment #5
stella commentedIn Drupal 6, the FAQ module just provided a custom built-in page at /faq which wasn't powered by Views. You could control the layout of it in the FAQ admin settings. In D7, this page is now at /faq-page. The other faq listings the module provides are built using the Views module. Both appear to be affected and could potentially be a problem in the i18n module. I'm waiting on more information from the i18n maintainer.
Comment #6
redseujacRemark for stella
It's strange: I do not have problems with another View I have created myself "News articles", as you can notice on my website www.daproverb.be.
Just click the different languages for "News articles" and you will see they are showing properly.
For "News articles" in Views I have following settings:
Filter criteria > Content translation: Language (= Current user's language)
Advanced > Other > Field language: Current user's language.
With the Views as part of the FAQ module it went wrong and it's impossible to make it work, even after removing the FAQ module and everything relating to it (Views, contents, etc.) and creating again from scratch.
Note: the page Frequently Asked Questions you see on my website now is not created with the FAQ module, but it's simply made adding "Basic pages" and links and their translation.
Best regards
Jacques
Comment #7
stella commentedmarking as a blocker
Comment #8
paragshah2005 commentedgo to admin/config/regional/i18n/select
remove the "views" from skip tags...that solves the problem!!
regds,
parag
Comment #9
redseujacUnfortunately it still does not work for me.
Regards
Jacques
Comment #10
stella commentedYeah removing the "views" tag is not really a stable solution. I've updated the Views code and also the in-built faq-page listing to accommodate the changes made in i18n 7.x-1.5 and both are working here for me now. It will be included in the next dev release of the module. I'd appreciate testing feedback if people have the time.
Comment #11
redseujacIs that update included in dev release dated June 16, 2012?
If so, I will test it as soon as I find some time.
Best regards
Jacques
Comment #12
stella commentedProb not, but it's in the one from 17th June for sure
Comment #13
redseujacOK, I'll download and install the dev from 17th June and give it a try. Then I'll post my findings here.
Comment #14
Atragene commentedCorrection I have made to correct this issues
by
I hope it will Okay for you !
Comment #15
redseujac@stella
Ok, I have installed the dev from 17th june, made my FAQs (so called "recent faqs") and translated in two other languages.
Perfect! No problems at all. That dev version solved my problem I had after applying the i18n 7.x-1.5 update :)
Thank you very much, stella for this update!
Best regards
Jacques
Comment #16
redseujac@stella
In my previous post I wrote everything was perfect and it still is, even after installation of the newest version of i18n (-7.x-1.6), but in my Reports I keep getting the following in Recent log messages:
"Notice: Undefined index: format in faq-view() (line 370 of ... /faq.module)."
When I look in this faq.module I see indeed at the line 370 the word "format", but I'm not well up in understanding the syntax to know what's wrong there.
Finally it's up to you to try to fix the problem shown continually in the Recent log messages.
Best regards
Jacques
Comment #17
Vietyank commentedI have installed the dev from 17 June. This has not fixed the problem for me.
Am I supposed to add a filter to the FAQ view? I am using the built-in page at /faq-page
Is there anything else I am supposed only see the FAQ Q&As in the user's selected language.
(flushed buffers)
Comment #18
Vietyank commentedI made modifications to the code as suggested in comment #14 and now it is working as I want it to. Those mod were not in the June 17 dev release that I installed. Just installing that release did not solve the problem.
Comment #20
Anonymous (not verified) commentedThis diff, based on Atragene's idea, enables only showing current language on default /faq pages in my sites (D7, FAQ 1.0-rc2, i18n 1.7). Forgive me my git ignorance.
Comment #21
phily#14 solved it (FAQ 7.x-1.0-rc2, i18n 7.x-1.7 and Views 7.x-3.5)
Thanks
Comment #22
mrfelton commentedI haven't tested this yet, but on glance it looks like it doesn't properly consider content that is set to LANGUAGE_NONE.
Comment #23
mrfelton commentedOK, so what this thread fails to mention is that the adjustments that were made to get the language support working require the i18n_select module to be enabled.
Comment #24
Strutsagget commentedworks like a charm, thx!
Comment #25
ericclaeren commentedHi, I have created a small patch based on the solution in this issue http://drupal.org/node/1543416. Tested it and it seems to work.
Comment #26
odizle commentedI go this after applying the patch. anyone else got this?
Fatal error: Call to undefined function i18n_select_langcodes() in /var/www/vhosts/techshuk.com/sites/all/modules/faq/faq.module on line 472
Comment #27
lendudeodizle, did you enable the i18n_select module as said in #23?
Len
Comment #28
webdrips commentedI wonder what on earth I could be doing wrong at this point? I applied the above patch to the dev/RC versions of FAQ, enabled the Multilingual select module, translated both the FAQ pages and the taxonomy terms, etc. yet I still can't seem to get the FAQ to display in the non-default language.
I originally had the issue mentioned by the OP where both the untranslated and translated versions were showing up, but now I can only see the default language.
If I recall correctly, I believe when I enabled the Multilingual select module, that's when only the default language was being displayed.
Would someone be so kind as to post their settings on a working site? Are people using the Title module to replace the name field? What are your "Multilingual options" on your FAQ taxonomy? What about the FAQ content type's "Multilingual support" setting?
For the most part, the rest of my site is fully translated and working.
Thanks.
Comment #29
portulacaFor me the default FAQ page (I don't use Views) was showing two languages. Updating to dev version didn't help, but enabling the Multilingual select module (from i18n) did.
Thank you for all the suggestions from this thread.
Comment #30
webdrips commentedSo my issue in #28 was solved by changing the "Categories layout" at /admin/config/content/faq/categories to "Don't display". If I try either "Clicking on category opens/hides questions and answers under category" or what I really want "Categories inline", I get an empty screen at /language/faq-page except for the two tabs at the top of the page.
Anyone get this working with Categories?
Comment #31
ezeedub commentedThe patch in #25 worked for me to a point. I'm using Categories, and still have the problem when the categories layout is anything other than "don't display". I don't get the empty screen described in #30. I get everything as expected minus the actual translated term. For instance, I get the correct counts under a category/term. Eg, for 1 translated term with a faq in 2 languages, it shows a count of 1 not 2 (where it did show 2 before applying this patch). If I switch to the language the faq is translated to, I see only those terms/categories that have faqs in that langauge, I see the correct counts (different from the source language), but I do not see the translated term/category.
I'm wondering if the untranslated terms are related to this issue: #1371696: Taxonomy terms not translated when viewing/editing node
Or, if not that one, something else in i18n? The reason I say that is because I actually *do* see the translated terms in the term reference select on the node edit page for a faq translation. So, what else could be causing the terms to not be translated on the faq page?
Comment #32
ezeedub commentedI think I found the issue. The function
faq_tt()is relying on the deprecated (for D7) functiontt().There's probably more refactoring that could be done here. Anyone who's more familiar with these modules, feel free to suggest better fixes.
Also, I tested this is working for me using a vocabulary with translation mode "localized". Not sure if there are any side effects for other modes.
Comment #33
Rustan commentedOn rc2 all faq questions showed for me. Upgrading to -dev fixed this, showing only the current language. No other changes, no patches. Multilingual select was activated since before.
Comment #33.0
Rustan commentedfixed a spelling error
Comment #34
freatida commentedI've followed instructions from #14
Posted by Atragene on June 18, 2012 at 6:32pm
and it worked like a charm.
thanks
Comment #35
Maya_SH commented#14 is working ... thanks man
Comment #36
mixael commented7.x-1.x-dev needs to be fixed as #14 to work correctly.
thanks to Atragene
Comment #38
sanchiz commentedComment #39
podarokpatch doesn't apply. Needs reroll
Comment #40
rfayThere are several basic problems here.
->condition(db_or()->condition("$weight_alias.tid", 0)->isNull("$weight_alias.tid"));which is definitely not something i18n_select can sort out.. This is the reason that the suggestion in #14 both works (and is required because i18n_select doesn't grok the situation).
I'm going to experiment a little bit more to see if there's a way to simplify that query so we could depend completely on i18n_select and let it do its job. In that case we could remove a bit of code and end up with a simpler situation.
Comment #41
rfayUpdating title to reflect the various problems.
Comment #42
rfayHere is the patch to address the issues in #40. Note that you *must* enable i18n_select module, part of the i18n module, for selection of proper FAQ answers to be done.
Comment #45
rfay#42needs a reroll after recent commits.
Comment #46
indigoxela commentedAny update on this old issue?
The problem still exists in faq 7.x-1.1 and drupal 7.56.