Coder Social home page Coder Social logo

eea / eea.facetednavigation Goto Github PK

View Code? Open in Web Editor NEW
20.0 95.0 56.0 6.06 MB

Faceted Navigation for Plone Classic

Home Page: http://eea.github.com/docs/eea.facetednavigation

Python 53.25% Shell 0.04% JavaScript 42.38% Makefile 0.46% SCSS 3.87%
plone plone5x plone4x plone-addon faceted-search

eea.facetednavigation's Issues

Version pins for Plone 4.2?

Does anyone know version pins that let eea.facetednavigation work with Plone 4.2?
The facet criteria page is giving a javascript error (TypeError: this.element.prop is not a function in the jqueryui script), making it really ugly, and you are not able to add a criterion/facet, only edit existing ones.

I have these pins with Plone 4.2.4, giving the above problem:

collective.js.jqueryui = 1.9.2.0
eea.faceted.vocabularies = 4.9
eea.facetednavigation = 6.8
eea.jquery = 7.7

On Plone 4.3.3 (that itself pins collective.js.jqueryui to 1.10.3, which you cannot use on Plone 4.2) all seems fine.

Adding custom css/javascript to a custom results preview

Following the summary.pt example I've created a new view template for showing results. I need to add some custom css's/javascripts by adding a section like this:

<metal:block fill-slot="style_slot">
        <link href="....." rel="stylesheet" type="text/css"/>
        <link href="......" rel="stylesheet" type="text/css"/>
    </metal:block>    

    <metal:jsslot fill-slot="javascript_head_slot">
        <script type="text/javascript" src="......"></script>                        
        <script type="text/javascript" tal:content="string:
            jQuery(document).ready( function() {
                shopFunction();
            });">
        </script>            
    </metal:jsslot>


    <body>
     ...... 
    </body>

but it does not work. What am I doing wrong here?
Thank you in advance.

Multiple select widgets for the same index overwrite each other

Multiple select widgets for the same index overwrite each other. The offending line is in .../browser/app/query.py: query.update(widget.query(kwargs))

For me it's much more useful if they AND rather than overwriting each other. For example, the following code iterates through every key in the new query. If it's also present in the old query it can convert it to a dictionary query with the 'and' operator, and concatenate the two together:

        def query_to_dict(a):
            if not isinstance(a, dict):
                if not isinstance(a, list):
                    a = [a]
                a = {'operator': 'and', 'query': a}
            return a

            new_terms = widget.query(kwargs)
            for term in new_terms:
                if term in query:
                    old_term = query_to_dict(query[term])
                    new_term = query_to_dict(new_terms[term])
                    new_term['query'] += old_term['query']
                    new_terms[term] = new_term
            query.update(new_terms)

Use of deprecated 'main' macro slots and HTML template code for JSON delivery

Hi,

we are having trouble setting up eea.facetednavigation on a Plone 4.1.3 site with a custom Diazo theme.
With the sunburst theme, everything works fine.
With our custom theme and Diazo enabled, we get the following problems:

  • we cannot access the 'faceted criteria' config tab (it does not show any content).
  • a page with the default widgets shows some ajax error message and all interaction remains being disabled after the error. The 'portal type' widget continues to display three animated squares. The error message will be replaced after a few seconds with a result list, however the whole page remains inactive to any user input.

Solution:

Going through the eea.faceetdnavigation code, I've found the following workarounds which fix all problems (as far as I can tell):

  1. the 'faceted criteria' page uses an old "main" macro slot instead of the preferred "content-core" - so replace the slot name in browser/template/configure.pt.
  2. browser/template/configure.pt also uses the old "main" slot. In fact, I don't really get the idea why there is an HTML template for delivering JSON code - firebug shows me that with Diazo and our theme enabled, the JSON code is wrapped with HTML tags, so jquery will barf and this causes the 'portal type' widget to freeze up. My solution was to simply remove all code from this template, then it worked.
  3. same as 2., there is another identical file at widgets/tagscloud/counter.pt

Best, Tobias

Path widget raises an error

If your faceted navigable object is a default view for it's parent the following error is raised when you add a new path facet:

2013-09-13 11:59:54 ERROR Zope.SiteErrorLog 1379062794.650.606216822095 http://localhost:8080/Plone/news/@@faceted.path.tree.json
Traceback (innermost last):
  Module ZPublisher.Publish, line 127, in publish
  Module ZPublisher.BaseRequest, line 517, in traverse
  Module ZPublisher.HTTPResponse, line 727, in debugError
NotFound:   <h2>Site Error</h2>
  <p>An error was encountered while publishing this resource.
  </p>
  <p><strong>Debugging Notice</strong></p>

  Zope has encountered a problem publishing your object.<p>
Cannot locate object at: http://localhost:8080/Plone/news/@@faceted.path.tree.json</p>
  <hr noshade="noshade"/>

  <p>Troubleshooting Suggestions</p>

  <ul>
  <li>The URL may be incorrect.</li>
  <li>The parameters passed to this resource may be incorrect.</li>
  <li>A resource that this resource relies on may be
      encountering an error.</li>
  </ul>

  <p>For more detailed information about the error, please
  refer to the error log.
  </p>

  <p>If the error persists please contact the site maintainer.
  Thank you for your patience.
  </p>

Make Faceted Navigation new-style Collection query aware

From stackoverflow http://stackoverflow.com/questions/24891254/plone-4-3-3-and-eea-faceted-navigation

I have several collections that are created by combinations of different 
Tags, which are working fine with the default Collections from 
Plone 4.3.3. But as soon as I enable faceted navigation in
the collection it seems to forget the query of the
collection and its results.Instead it displays every possible item.

Did I miss something in the configuration? Do I need to
make the "pre"-query with faceted navigation too?

Questions: home page, portlet for non-nav page, tools

(For some reason I don't see the "labels" widget here to mark this issue as a question.)

A couple of questions:

  1. I tried adding eea.faceted.tools to my buildout, and it didn't find it. It's mentioned on the pypi page, so I was curious, but I could not find any documentation for it anywhere, so maybe it's gone?
  2. Are there are any technical reasons why it would be a bad idea to use eea.facetednavigation on the home page of a site?
  3. Is there an easy way to add a portlet to a non-navigation page, that contains some faceted search widgets, but redirects to an actual eea.facetednavigation page when activated? Example (I don't have any relationship to this site, and I don't think it's Plone): http://www.skillsforemployment.org/KSP/en/index.htm

Thanks!

Firefox bug(?) surfaces with a specific set of options for the select widget

Steps to reproduce:

  1. Set up a Plone site with eea.facetednavigation search and a select widget
  2. Configure the select widget to count the number of results, and to order by result count. Do NOT choose a default value.

What to expect:
The select widget has preselected all as its first value.

What you see with latest firefox (28)
The select widget has preselect the last choosable item.

Count query ignores hidden path filter

In my page I have put some hidden prefilters in order to reduce the amount of brains to be counted (I have 1.5M documents in the portal catalog). I have also a hidden path filter which scopes the search (and count) to just a folder. Unfortunately it looks like the path filter is ignored by the counter.

Ive printed out the queries (for counter and search) when the path filter is hidden:

Count query: {'version': '1c483123a50921cc32670797db4eb8ec', 'b_start': '0'}
Search query :{'path': {'query': '/Site/products', 'level': -1}, 'facet.field': [u'portal_type'], 'Language': ['en', '']}

And here the same output when the filter is visible:
Count query: {'version': 'c4939119a9c0515ee58c58d7f0668e02', 'b_start': '0', 'c2[]': '/products'}
Search query :{'path': {'query': '/Site/products', 'level': -1}, 'facet.field': [u'portal_type'], 'Language': ['en', '']}

Faceted Navigation has a hard dependency on Archetypes

The configure_faceted view relies on Archetypes widgets to render, so if for example you have installed plone.app.contenttypes [https://github.com/plone/plone.app.contenttypes] and are using it to make everything a Dexterity content type instead of AT, you get the following stack trace for a folder:

Traceback (innermost last):
  Module ZPublisher.Publish, line 126, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 46, in call_object
  Module Products.Five.browser.metaconfigure, line 476, in __call__
  Module Products.Five.browser.pagetemplatefile, line 125, in __call__
  Module Products.Five.browser.pagetemplatefile, line 59, in __call__
  Module zope.pagetemplate.pagetemplate, line 132, in pt_render
  Module zope.pagetemplate.pagetemplate, line 240, in __call__
  Module zope.tal.talinterpreter, line 271, in __call__
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 888, in do_useMacro
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 533, in do_optTag_tal
  Module zope.tal.talinterpreter, line 518, in do_optTag
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 954, in do_defineSlot
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 533, in do_optTag_tal
  Module zope.tal.talinterpreter, line 518, in do_optTag
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 858, in do_defineMacro
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 954, in do_defineSlot
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 533, in do_optTag_tal
  Module zope.tal.talinterpreter, line 518, in do_optTag
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 954, in do_defineSlot
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 533, in do_optTag_tal
  Module zope.tal.talinterpreter, line 518, in do_optTag
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 946, in do_defineSlot
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 821, in do_loop_tal
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 533, in do_optTag_tal
  Module zope.tal.talinterpreter, line 518, in do_optTag
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 583, in do_setLocal_tal
  Module zope.tales.tales, line 696, in evaluate
   - URL: /Users/TomB/repositories/plone_coredev/plone.app.contenttypes/src/eea.facetednavigation/eea/facetednavigation/browser/template/configure.pt
   - Line 129, Column 8
   - Expression: <PythonExpr (view.get_schema(criterion))>
   - Names:
      {'args': (),
       'container': <Folder at /site/ibnihb>,
       'context': <Folder at /site/ibnihb>,
       'default': <object object at 0x1002d4b70>,
       'here': <Folder at /site/ibnihb>,
       'loop': {},
       'nothing': None,
       'options': {},
       'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x10871b158>,
       'request': <HTTPRequest, URL=http://localhost:8080/site/ibnihb/configure_faceted.html>,
       'root': <Application at >,
       'template': <Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 0x10876d590>,
       'traverse_subpath': [],
       'user': <PropertiedUser 'admin'>,
       'view': <Products.Five.metaclass.SimpleViewClass from /Users/TomB/repositories/plone_coredev/plone.app.contenttypes/src/eea.facetednavigation/eea/facetednavigation/browser/template/configure.pt object at 0x10a094990>,
       'views': <Products.Five.browser.pagetemplatefile.ViewMapper object at 0x10a094c90>}
  Module zope.tales.pythonexpr, line 59, in __call__
   - __traceback_info__: (view.get_schema(criterion))
  Module <string>, line 1, in <module>
  Module eea.facetednavigation.browser.app.configure, line 331, in get_schema
  Module eea.facetednavigation.browser.app.schema, line 40, in __call__
  Module eea.facetednavigation.widgets.schema, line 23, in __call__
  Module Products.Five.browser.pagetemplatefile, line 125, in __call__
  Module Products.Five.browser.pagetemplatefile, line 59, in __call__
  Module zope.pagetemplate.pagetemplate, line 132, in pt_render
   - Warning: Macro expansion failed
   - Warning: <type 'exceptions.NameError'>: name 'faceted_widget' is not defined
  Module zope.pagetemplate.pagetemplate, line 240, in __call__
  Module zope.tal.talinterpreter, line 271, in __call__
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 858, in do_defineMacro
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 821, in do_loop_tal
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 533, in do_optTag_tal
  Module zope.tal.talinterpreter, line 518, in do_optTag
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 821, in do_loop_tal
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 533, in do_optTag_tal
  Module zope.tal.talinterpreter, line 518, in do_optTag
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 533, in do_optTag_tal
  Module zope.tal.talinterpreter, line 518, in do_optTag
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 867, in do_useMacro
  Module zope.tales.tales, line 696, in evaluate
   - URL: /Users/TomB/repositories/plone_coredev/plone.app.contenttypes/src/eea.facetednavigation/eea/facetednavigation/widgets/schema.pt
   - Line 35, Column 8
   - Expression: <PythonExpr (faceted_widget.get_macro(field_id, 'edit'))>
   - Names:
      {'args': (),
       'container': <Folder at /site/ibnihb>,
       'context': <Folder at /site/ibnihb>,
       'default': <object object at 0x1002d4b70>,
       'here': <Folder at /site/ibnihb>,
       'loop': {},
       'nothing': None,
       'options': {},
       'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x108715db8>,
       'request': <HTTPRequest, URL=http://localhost:8080/site/ibnihb/configure_faceted.html>,
       'root': <Application at >,
       'template': <Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 0x108787c90>,
       'traverse_subpath': [],
       'user': <PropertiedUser 'admin'>,
       'view': <eea.facetednavigation.widgets.schema.Schema object at 0x109fba310>,
       'views': <Products.Five.browser.pagetemplatefile.ViewMapper object at 0x109fba550>}
  Module zope.tales.pythonexpr, line 59, in __call__
   - __traceback_info__: (faceted_widget.get_macro(field_id, 'edit'))
  Module <string>, line 1, in <module>
  Module eea.facetednavigation.widgets.widget, line 102, in get_macro
  Module Products.Archetypes.generator.widget, line 147, in __call__
AttributeError: Macro widgets/string does not exist for <Folder at ibnihb>

It would be really awesome for this product to be able to support both AT and Dexterity based folders!

Current Search widget expanded by default in 4.6

This may be intentional, but there has been a slight change in the Current Search widget which now defaults to being expanded whereas before it was collapsed.

I guess ideally one could configure to have it expanded or collapsed by default. My pref is for the default to remain as was previous but I can see that it's debatable what the correct default behaviour is.

Search text is blank but is returned after a check box or combo box is selected.

Here are the steps to reproduce this scenario:

  • The facet settings are enable smart facets hiding, and enable facet navigation.
  • On the Searching text, enter 'spam' and click 'search' button. The page is refresh and results returns.
  • Now, I remove the 'spam' on the Searching text, so the Searching text is blank. Then I change other options, for example gender field combo box, from female to male. Then page is refresh and results returns.
  • The 'spam' still in Searching text and not removed.

The 'spam' text only can remove by removing the 'children' on the Searching text and click 'search' button. The 'spam' should be remove, when we selecting other options.

Dexterity Support

This ticket is a summary ticket, meant to summarize what is missing for dexterity support. I'll add links to issues related to dexterity:
#27 Hard Archetypes references and problems with it
#25 Umlauts in Checkbox Widgets break eea.facetednavigation. (Partially related. Will work after dexterity support is there)

Missing input validation in eea/facetednavigation/browser/app/query.py

We occasionally get a traceback in our installation of eea.facetednavigation.
We cannot reproduce it as a user with our browser, but we can repeat the exact query the user provided.
It results in a traceback that is being catched unconditionally and logged away. Since we log to sentry, we get to see it.

This is the raw traceback


UnicodeDecodeError Root Cause

'ascii' codec can't decode byte 0xc3 in position 8: ordinal not in range(128)
Stacktrace (most recent call last):

  File "home/starzel/buildouts/xxx/src-mrd/eea.facetednavigation/eea/facetednavigation/browser/app/query.py", line 130, in query
    brains = catalog(self.context, **query)
  File "home/starzel/buildouts/xxx/src-mrd/eea.facetednavigation/eea/facetednavigation/search/catalog.py", line 56, in __call__
    return search(**newquery)
  File "home/starzel/.buildout/eggs/Products.CMFPlone-4.3.3-py2.7.egg/Products/CMFPlone/CatalogTool.py", line 393, in searchResults
    return ZCatalog.searchResults(self, REQUEST, **kw)
  File "home/starzel/.buildout/eggs/Products.ZCatalog-2.13.27-py2.7.egg/Products/ZCatalog/ZCatalog.py", line 604, in searchResults
    return self._catalog.searchResults(REQUEST, used, **kw)
  File "home/starzel/.buildout/eggs/Products.ZCatalog-2.13.27-py2.7.egg/Products/ZCatalog/Catalog.py", line 925, in searchResults
    return self.search(args, sort_index, reverse, sort_limit, _merge)
  File "home/starzel/.buildout/eggs/Products.ZCatalog-2.13.27-py2.7.egg/Products/ZCatalog/Catalog.py", line 545, in search
    r = _apply_index(query, rs)
  File "home/starzel/.buildout/eggs/Products.ZCatalog-2.13.27-py2.7.egg/Products/PluginIndexes/common/UnIndex.py", line 403, in _apply_index
    s = index.get(k, None)

The stacktrace is incomplete because in eea/facetednavigation/browser/app/query.py it gets logged away, but that does not matter, the __call__ method does nearly call this method directly, with no input validation regarding encoding. But the catalog assumes everything to be pure ascii

Zope Favicon

within a plone4.1 the site favicon is exchanged with the default zone favicon.
i suspect this happens on the ajax-load of the results

Results Are Not Shown Until User Selects a Filter

With version 4.5, results were immediately presented, even before the user selected a filter value from one of the facets. With the latest v5.9, this is the not case. No results are presented until after the user selects a filter value from a facet.

Is there a 'present results immediately / before filtering' option that can be enabled?

Accessibility compliance: select element missing an associated label

Add a label element that surrounds the control's label. Set the for attribute on the label element to the same value as the idattribute of the control. And/or add a title attribute to the input element. And/or create a label element that contains the inputelement.

For example, the language select input element does not have label close to it, refer to screen shot.

Refer to Web accessibility checker 91

Resources MHCS - Google Chrome_267

Thank you

Order for criteria in a query

In my project we have to filter more than 1M items in zeodb. We have a page with some widgets and we know that one of them is very heavy. Fortunately there are some other widgets (filters) which can reduce the partial resultset and speed up a little the query. Is there any way to define the order in which the filter should be applied in the query?

Portal view customizations error

Hi again,

· Plone 4.1.6
· eea.facetednavigation 6.7

I can't customize faceted_widgets file:
ZMI -> portal_view_customizations -> faceted_widgets -> Customize:
Macro expansion failed
type 'exceptions.AttributeError': @@faceted_macros

Is this normal?

Thanks,

Manuel

Plone 5: Configuration of the widgets fails due to the plone.protect

Plone Protect does not allow to make any configuration changes in the configure_faceted.html panel.
It does not happen if you create or add widgets - only if you try to edit.

plone protect raises this error:

Forbidden: Form authenticator is invalid.

Workaround is

export PLONE_CSRF_DISABLED=true

before starting the instance.

switching portal-types to hidden breaks other widgets

In short:
If in an default install (buildout/plone4 from github) the "portal-types" checkbox widget is set to hidden all widgets are hidden/not shown.

What I did:

  1. cloned this repos fork on collective
  2. created new plone site with eea.facetednavigation
  3. created 5 pages with some test content
  4. created a new folder "Faceted Nav"
  5. activated facetednavigation (btw., why are there now two actions, i took the first and it looked as usal?)
  6. click on view

->>> Now only the results are shown and all other widgets (results per page, sort on) are gone.

Tree View for Path Widget Is Overlapped

On Plone 4.2.6, when the tree view is long enough, it will be overlapped by the footer.

path-widget-tree

By inspecting element in Chrome, if z-index is append in the style settings, everything seems OK.

<div class="tree tree-green" id="jstree_1" style="...">

However, I don't know how to fix this in source codes.

Unspecified macro causes traceback

As far as I can see, this line:

<metal:block use-macro="view/macros" />

from here https://github.com/eea/eea.facetednavigation/blob/master/eea/facetednavigation/browser/template/query.pt#L12

causes a traceback like the following:

Module zope.pagetemplate.pagetemplate, line 113, in pt_render
   - Warning: Macro expansion failed
   - Warning: <type 'exceptions.TypeError'>: object of type 'NoneType' has no len()
  Module zope.tal.talinterpreter, line 271, in __call__
  Module zope.tal.talinterpreter, line 343, in interpret
  [...]
  Module zope.tal.talinterpreter, line 871, in do_useMacro
  Module zope.tal.taldefs, line 151, in isCurrentVersion
  Module zope.tal.taldefs, line 172, in getProgramVersion
TypeError: object of type 'NoneType' has no len()

This is what a trace looks like:

2012-11-13 08:46:03 INFO Zope Ready to handle requests
> /.../webapps/site/buildout-cache/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/taldefs.py(152)isCurrentVersion()
-> version = getProgramVersion(program)
(Pdb) getProgramVersion(program)
*** TypeError: object of type 'NoneType' has no len()
(Pdb) u
> /.../webapps/site/buildout-cache/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py(871)do_useMacro()
-> if not isCurrentVersion(macro):
(Pdb) print macro
None
(Pdb) u
> /.../webapps/site/buildout-cache/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py(343)interpret()
-> handlers[opcode](self, args)
(Pdb) l
338                             s = s[:76] + "...\n"
339                         sys.stderr.write(s)
340                         handlers[opcode](self, args)
341                 else:
342                     for (opcode, args) in program:
343  ->                     handlers[opcode](self, args)
344             finally:
345                 self.level = oldlevel
346
347         def do_version(self, version):
348             assert version == TAL_VERSION
(Pdb) opcode
'useMacro'
(Pdb) self
<zope.tal.talinterpreter.TALInterpreter object at 0x7f6afcad77d0>
(Pdb) print args
(u'view/macros', <PathExpr standard:u'view/macros'>, {}, [('beginScope', {u'use-macro': u'view/macros'}), ('optTag', (u'metal:block', None, 'metal', 1, [('startEndTag', (u'metal:block', [(u'use-macro', u'view/macros', 'metal')]))], [])), ('endScope', ())])
(Pdb) handlers[opcode]
<function do_useMacro at 0x2d48e60>

Widget titles translation

Hi,

Can I translate my widget titles of eea.facetednavigation folder view?

I'm testing with:
· Plone 4.1.6
· eea.facetednavigation 6.7 (checkbox widgets)
· Products.LinguaPlone 4.1.3
but I don't see how to do it.

Thanks,

Manuel

Filtering of events by start date

We have a site using a faceted navigation to filter content that includes some pages and events.

Our problem is when we have to select a date to filter the events: normally, we have to use the effective date of the content type instead of the start date of the event and that's not the expected behavior by the user.

How do you normally handle this?

Default sort by relevance if user entered search text

If there's no sorting widget, eea.facetednavigation currently defaults to a reverse sort by the effective index (https://github.com/eea/eea.facetednavigation/blob/master/eea/facetednavigation/browser/app/query.py#L98).

But when there's a SearchableText query, I think it makes more sense to sort by term relevance (i.e. don't supply a sort_on at all) by default.

I've monkey patched this for our project and can contribute a pull request if you are interested.

Plone 5: jQuery ajaxfileupload Plugin missing

After the installation, the configure_faceted.html page does not render widgets properly. Adding jquery.ajaxfileupload manually to the Resource Registry fixes this problem. Has this something to do with the faceted_view compilation problem?

from registry.xml:

class for widget identification base on widget title

it would be nice to have identifiers in form of a class derived of the widget title to allow more context specific styling

for example

<div class="faceted-widget faceted-select-widget widget-membersearch" style="" id="c4_widget">
<fieldset class="widget-fieldset">
<legend>Membersearch</legend>

the navtree portlet has a similar naming for the navtree sections

<li class="navTreeItem visualNoMarker navTreeFolderish section-members">

Path depth/level

Why do depth parameter of path widget in fact uses the level parameter for catalog query ? I want to fix this but I'm not sure if it is a bug or a feature (in fact, the parameter doesn't do what it says.)

Struggling to get started: "This site encountered an error trying to fulfill your request"

We installed eea.facetednavigation and enabled faceted navigation for a collection.
We added a "Tags" widget which shows a tag cloud reflecting assigned keywords in the site. When we click on a tag, the results view flashes an error message:

This site encountered an error trying to fulfill your request
If the error persists please contact the site maintainer. Thank you for your patience.

Also the three-dot spinner keeps spinning, and clicking anywhere in the content area is disabled.

Picked versions are:

eea.facetednavigation = 4.8
collective.js.jqueryui = 1.8.16.8
eea.faceted.vocabularies = 4.2
eea.jquery = 4.3

Plone 4.1.5

Bug: Checkbox Widget with non-ascii characters such as Ü does not work

I have checkboxes using vocabulary with a list of cities from a custom catalog index. Works fine as long theres no city such as Nürnberg: Then theres an empty result.

I wrote it now Nuernberg (which is allowed in german but ugly) to workaround.

I did not test it furthermore, but i expect it to break with any non-ascii character here.

Html stuff in filter description

When using filter widget and a countable checkbox widget, description in filter widget contains html tags (as text). For instance (sorry for the italian text):

[X]Categoria
    [X]Foto Storica <span>(40708)</span>

[X] Remove all   

faceted_edit.css should not managed via portal_css ?

Adding css with conditions and specific render type (import) makes portal_css generate many css (there is one css generated each time a condition or a render type change)

faceted_edit.css, on most sites, will be loaded just on one page
AFAIC, we'd better load this css dicrectly via a viewlet than using the portal_css

<div> position mismatch in eea/facetednavigation/browser/template/widgets.pt

Hi,

is there a good reason why the two divs with id "center-area" and id "left-area" are not in the right order ("center-area" is before "left-area"). From what I see it is because of a "float:right" applied on these ids and the "right-area" div.

Moreover, why are center and left area together? Would that make sense that I propose a pull request setting everything on the same level (each 3 divs separated) and using "float:left" so it is responsive?

We could obviously customize or use super new things like display:flex; but if it is for legacy or I do not know why, I suppose it is better to make the change in the template itself...

Thank you ;-)

Gauthier

Improve support for use as site search

The documentation on PyPI includes this line: 'FacetedNav can also be used as an advanced search for your site'. However there is no documentation explaining how, and even once you do know how it's not fully-featured enough to be deployable in a real-world context.
I think the following enhancement would need to be made:

  1. Allow the value of a Tal expression faceted to appear in the 'current search' facet
  2. Include the result of a tal expression portlet when counting results (currently it doesn't)

Perhaps what is needed is a dedicated site search facet, which will pull in the search string (perhaps without the need to replace the '?' with a '#') and actually display a text field (like a text facet).

Bug: Select widget does not accept the value that contains apostrophe.

For example,

<select class="faceted_select" name="c5" id="c5">
  <option title="All" value="">All</option>
  <option value="abuse" title="abuse">abuse</option>
  <option value="children's safety" title="children's safety">children's safety</option></select>

If the user select "Children's safety", the option won't save.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.