Closed (fixed)
Project:
Translation Management Tool
Version:
7.x-1.x-dev
Component:
Source: Node
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Feb 2013 at 17:18 UTC
Updated:
2 Aug 2013 at 14:11 UTC
Jump to comment: Most recent file
Comments
Comment #1
miro_dietikerThere is a filter
It is applied as exposed filter:
However it seems we don't filter for supported types as a static filter in the list.
Comment #2
miro_dietikerThere's some duplicate code regarding the handler for tmgmt_translatable_types.
First let's remove the obsolete definition.
Then we'll need to introduce a new handler to always filter for the permitted types only.
Comment #3
berdirViews does support having a fixed limited list + optionally allowing to expose that limited list as an exposed filter.
However, that probably doesn't really work for our case as the limited list is different for each site.
So, what we could do is make that the default behavior for our plugin. Always limit the the translatable types even if nothing is selected and limit to the selection if something is selected. Might need some adjustments in the description/settings to make that obvious.
Comment #4
berdirComment #5
berdirComment #6
cgalli commentedhere we go...
Comment #8
berdirThanks.
Should have a @file docblock that says "Contains classname.".
And the class should have a docblock too that describes what it does in a short sentence.
Missing docblock, just write {@inheritdoc} in it.
Indendation is off, code should be 2 spaces in, the } not.
The @todo can be removed too.
Comment #9
berdirTurned out to be not quite that easy ;)
We need both filters. One that always enforces that only translatable types are shown and an exposed filter that allows to select one of the translatable types. I wasn't able to combine this, looks like query() isn't called on exposed filters that have no selection.
Also updated our tests to make sure we have test coverage for this and cleaned them up a bit.
Comment #10
cgalli commentedI am getting this:
Notice: Undefined index: types in views_handler_filter->accept_exposed_input() (line 1260 of /var/www/tmgmt/sites/all/modules/views/handlers/views_handler_filter.inc).
when calling the view. cc all run, no updates neccessary
Comment #11
berdirSome improvements on the labels, as discussed with Miro.
Comment #12
berdir@cgalli: You need to reset your view back to the default.
Comment #13
cgalli commentedinstalled and tested.
both the internal and the exposed filter seem to work.
Comment #14
miro_dietikerThe API defines:
* @param int $language_content_type
* Flag of how the translation should be handled.
I guess it's no more a flag.
I would expect verbose description for what we test like
// Make sure content that is not translatable is not on list.
i would say
*_all
*_select
As defined with the revised label.
Rest looks fine.
Comment #15
berdirUpdated the documentation of the flag, added comments to those assertions, renamed the views fields and fixed and re-exported the view.
Comment #16
berdirCommitted and pushed!