Hi all,
I'm maintaining a nodequeue where translated versions of the nodes are available.
In the setting for the nodequeue - "Treat translation nodes as a single node" is selected.
The logic here is that if a queue is re-ordered/added to, then that would be reflected in all languages.
Is that correct?
Using the default view provided by nodequeue, only Nodes in English [base language] are provided.
path nodequeue/2
I added the view to a menu, and then translated that Menu item to Spanish.
However when view is displayed in Spanish
path es/nodequeue/2
no nodes are displayed.
Expected behaviour [from me !] would be to display the translated versions of the nodes.
Is there anyway to configure that behaviour?
Regards
Alan
Comment | File | Size | Author |
---|---|---|---|
#24 | nodequeue-translated_node_relations-982382-24.patch | 7.1 KB | tinker |
#18 | Screen Shot 2011-10-11 at 8.16.45 PM.png | 57.5 KB | setvik |
Comments
Comment #1
stella CreditAttribution: stella commentedsubscribe
Comment #2
alanburke CreditAttribution: alanburke commentedI should add that I'm using i18nviews module, with the 'Content negotiation' filter in the views.
Comment #3
rolando.isidoro CreditAttribution: rolando.isidoro commentedHi Alan,
I'm facing the same problem as you, at this point I still can't quite figure out how Nodequeue handles translated nodes. The only way I managed for the nodes to show up in a single nodequeue view in two languages was to:
I was somewhat surprised as I read your post, since you mention a "Treat translation nodes as a single node" setting which I can seem to find in any Nodequeue configuration form. I'am also using version 6.x-2.9, so can you tell me where can I find that setting?
Thanks in advance,
Rolando Isidoro
Comment #4
alanburke CreditAttribution: alanburke commentedHi Ronald
That setting is right at the bottom of the settings page for the individual nodequeue.
[I went with a different solution in the end, but I might be back to this issue in the future]
Comment #5
rolando.isidoro CreditAttribution: rolando.isidoro commentedHi Alan,
after writing my reply, I noticed on my site status report that in order for nodequeue to handle translations I needed to install the Translation helpers module and so I did.
The "Treat translation nodes as a single node" setting is now showing at the bottom of the create/edit nodequeue form, but after enabling it the result remains the same, I still have to manage translation nodes in the queues on my own.
Can you tell me which solution did you end up with?
Regards,
Rolando Isidoro
Comment #6
alanburke CreditAttribution: alanburke commentedHi Rolando
We didn't use nodequeue at all in the end.
Built some extra views.
But we may have to revisit.
Comment #7
Naiya CreditAttribution: Naiya commentedhave the same here! i have an option called "Add translations of content to the queue as a group" at the bottom of edit nodequeue but i cannot change it..
Comment #8
Naiya CreditAttribution: Naiya commentedi don't know why it is not editable while on another instance of drupal it's ok. but i cannot reach other nodes than in default language that way.. well, not yet i hope :)
Comment #9
jchatard CreditAttribution: jchatard commentedHi all,
Same problem here.
Also tested with latest dev version.
Jérémy
Comment #10
yvmarques CreditAttribution: yvmarques commentedHello,
I've the same problem and I found why we don't have the nodes in another languages.
To get nodes from a nodequeue you need add relationship in the views if you've activated "Treat translation nodes as a single node" option you'll have only the source node in the nodequeue.
Until there it's normal, but the problem it's when you want show nodes from another language, because they aren't part of nodeque, I mean they aren't in nodequeue_nodes table, they're not selected by the relation.
I tried to find a solution with different configs, like Node translation : Sources and etc.. without success. I guess the only way how to fix it, is to add a possibility to tell nodequeue that the children nodes from source are also in nodequeue_nodes.
Regards,
Comment #11
yvmarques CreditAttribution: yvmarques commentedHi again,
I was starting to do a smartqueue module for languages, that can help us in this issue and finally somebody else already start to do it. You can find it there, I installed and try it's work fine for me :)
http://drupal.org/project/smartqueue_language
Regards,
-- Yvan
Comment #12
Fernando Vesga CreditAttribution: Fernando Vesga commentedhi, you should look at this http://drupal.org/node/433930#comment-2759852.
i was very helpful to me.
Comment #13
amateescu CreditAttribution: amateescu commentedMarking as fixed based on #12 and until proven otherwise :)
Comment #15
mattez CreditAttribution: mattez commentedThe Source Translation trick sort of worked for me too. But it shows only nodes which are already translated. Nodes without translation are not shown. I want simple thing: one multilingual limited (Queue size) nodequeue. So Internalization must be setup to "Treat translation nodes as a single node". And then display nodes in queue based on the current user language. It should not be dependent on whether the node is translated or not.
Example:
Same when I put untranslated node in Spanish to nodequeue. Until I translated it its not shown in nodequeue.
I want to show all nodes in queue and than filter them via views lang filter Content translation: Language (= Current user's language).
I have tried to use "Content translation: Translations" setup to show ALL translations.
It really returns all nodes from my nodequeue, but setting up lang filter did nothing, still shows all translated nodes regardless of filter settings.
What I'm missing?
My setup:
Drupal 7.0
Internationalization 7.x-1.0-beta5
Translation helpers 7.x-1.x-dev
Nodequeue 7.x-2.0-alpha1
Comment #16
setvik CreditAttribution: setvik commentedHere's what worked for me:
You'll need 3 relationships & some funky filtering.
Relationships
Filtering
Comment #17
goofrider CreditAttribution: goofrider commentedI can follow #16 only up to the very last step. How do I create a filter group in Views 3?
Comment #18
setvik CreditAttribution: setvik commentedClick the "and/or" option in the dropdown next to "Filter criteria" on the views configuration screen to create the filter group.
My screen looks like this:
Comment #19
mattez CreditAttribution: mattez commentedStevik THANX a LOT!! It works!! Great!
Hint for others:
For correct SORTING set SORT CRITERIA to
Stevik THANX a LOT again!
Comment #20
pauleb CreditAttribution: pauleb commentedThanks Stevik for the clear, structured instructions and mattez for the additional hint!
I managed to get it right at the second try. I misread your post as if the additional filters, where you used the language filter as example were optional and the selection would be done through the relationships.
So for the folks to come - make sure you also set the language filter:
Content translation: Language = current user's language
Comment #21
rafinskipg CreditAttribution: rafinskipg commentedJust do this for seeing translated nodes based on currents user language.
With this and with #16 and #18 all is done,
I close the issue
Comment #22
dystopianblue CreditAttribution: dystopianblue commented#16 + hint from #19 did the trick!
Comment #23
drupalninja99 CreditAttribution: drupalninja99 commented#16 looks like it works for me
Comment #24
tinker CreditAttribution: tinker commentedI was not happy with the complexity of the workarounds to get proper results from multilingual nodes using 'Treat translation nodes as a single node' [i18n is TRUE]. I have created a patch that modifies the nodqueue view relationship handler to properly select translated versions of content. I do not think this is a 'support request' nor does the module 'work as designed'. I have therefor set this as a bug that needs review. This thread was originally a 6.x issue so I have switched it back.
After applying this patch all you have to do is create a view, add a nodequeue relationship [Queue (qid)], then add 'content negotiation' filter.
Upgrade notes:
Changes made
This modifies the join statement ON condition. For queues that use i18n from (node.nid = nodequeue.nid) to (node.nid = nodequeue.nid OR node.tnid = nodequeue.nid) which selects all langauges of the source node.
Suggestion
I do not think that limiting results in the relationship is the Views way of doing things. Relations are meant to link content and not filter it. I suggest that a view filter that uses the relationship be used instead. If people agree I can modify this patch and create the filter. I kept it the way it was to reduce code change complexity and so that existing user's workflow would remain the same.
Comment #25
erikstraub CreditAttribution: erikstraub commentedForgive me if this is naive, but wouldn't this just be as simple as doing the following?
* Note this is also selecting nodes with undefined language
Comment #26
tinker CreditAttribution: tinker commented@erikstraub, I think there is a difference on the join to nodequeue_nodes in your SQL. When I was reworking this I remember reworking the primary query to provide nid or tnid on the join and then pulling all the info from the join. I am traveling right now an cannot test. If you can then please report your findings. The language negotiation is handled by i18n module and cannot be hardcoded as it has multiple factors. If I remember correctly the nid/tnid table join influenced this.
Comment #27
tinker CreditAttribution: tinker commented@erikstraub, I was finally able to test and can confirm that your SQL does not return the correct results. If 'Treat translation nodes as a single node' is enabled then only the source 'nid' is stored in 'nodequeue_nodes'. The more complex join is required to get the source 'nid' or the translated 'nid' from 'node' table. The join is also required so that i18n can alter the SQL for language negotiation.
Comment #28
bryanhidalgo CreditAttribution: bryanhidalgo commented#16 works like a charm! Thanks
Comment #29
letrotteur CreditAttribution: letrotteur commentedWorks great for me but only for the admin role? Anyone experienced something similar?
I mean #16 works great for the admins, but other roles only get translated nodes. Might be missing some permissions but just can't figure it out.
Comment #30
chousmith CreditAttribution: chousmith commentedjust wanted to say that #16 steps worked like a champ for our site, Drupal 7.26 + Views 7.x-3.7 + Nodequeue 7.x-3.x-dev , with the particular Nodequeue itself set to "Treat translation nodes as a single node". yay
Comment #31
SoubiI have the same problem that letrotteur describe in #29 (Drupal 7.28 + Views 7.x-3.8 + Nodequeue 7.x-2.0-beta1)
The method describe in #16 works only for the admins, not for anonymous user :(
Comment #32
pfrenssenI can't get the ordering to work when using the approach suggested in #19. Not all nodes in my nodequeue are translated, so I'm displaying a mix of current language nodes and nodes in the default language. By ordering first on the current language and then on the default language all my current language nodes appear near the top of the queue.
Comment #33
pfrenssenYou can also achieve it by altering the Views query programmatically.