Skip to content

Conversation

@petschki
Copy link
Member

@petschki petschki commented Feb 15, 2021

@MrTango
Copy link
Contributor

MrTango commented May 27, 2021

the requirement was merged already, so this could be merged after resolving conflicts. So it can be shipped with the new release.

@petschki petschki removed the request for review from thet May 27, 2021 07:37
@petschki petschki merged commit a0ab115 into master May 27, 2021
@petschki petschki deleted the ajax-geojson branch May 27, 2021 08:01
@thet
Copy link
Member

thet commented May 27, 2021

👍

@MrTango
Copy link
Contributor

MrTango commented May 27, 2021

@petschki is this working for you in master? i get the folling error:

Traceback (innermost last):
  Module plone.app.portlets.manager, line 54, in safe_render
  Module Products.Five.browser.pagetemplatefile, line 126, in __call__
  Module Products.Five.browser.pagetemplatefile, line 61, in __call__
  Module zope.pagetemplate.pagetemplate, line 135, in pt_render
  Module Products.PageTemplates.engine, line 378, in __call__
  Module z3c.pt.pagetemplate, line 176, in render
  Module chameleon.zpt.template, line 302, in render
  Module chameleon.template, line 214, in render
  Module chameleon.utils, line 53, in raise_with_traceback
  Module chameleon.template, line 192, in render
  Module 3745aa51280382c2998084cbae4aff5b, line 434, in render
  Module zope.tales.expressions, line 250, in __call__
  Module Products.PageTemplates.Expressions, line 188, in _eval
  Module zope.tales.expressions, line 153, in _eval
  Module Products.PageTemplates.Expressions, line 105, in trustedBoboAwareZopeTraverse
  Module zope.traversing.adapters, line 156, in traversePathElement
   - __traceback_info__: (<collective.collectionfilter.portlets.maps.Renderer object at 0x7f62e01410d0>, 'geojson_ajax_url')
  Module zope.traversing.adapters, line 61, in traverse
   - __traceback_info__: (<collective.collectionfilter.portlets.maps.Renderer object at 0x7f62e01410d0>, 'geojson_ajax_url', [])
zope.location.interfaces.LocationError: zope.location.interfaces.LocationError: (<collective.collectionfilter.portlets.maps.Renderer object at 0x7f62e01410d0>, 'geojson_ajax_url')

 - Expression: "view/geojson_ajax_url"
 - Filename:   ... nfilter/src/collective/collectionfilter/portlets/maps.pt
 - Location:   (line 10: col 23)
 - Source:     data-geojson="${view/geojson_ajax_url}"></div>
                               ^^^^^^^^^^^^^^^^^^^^^
 - Arguments:  template: <Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 0x7f62e70a7b90>
               options: {}
               args: ()
               nothing: None
               modules: <Products.PageTemplates.ZRPythonExpr._SecureModuleImporter object at 0x7f62f067f390>
               request: <WSGIRequest, URL=http://localhost:8080/Plone/filter-example/collection-you-can-filter-down/listing_view>
               view: <collective.collectionfilter.portlets.maps.Renderer object at 0x7f62e01410d0>
               context: <Collection at /Plone/filter-example/collection-you-can-filter-down>
               views: <Products.Five.browser.pagetemplatefile.ViewMapper object at 0x7f62e2d7d6d0>
               here: <Collection at /Plone/filter-example/collection-you-can-filter-down>
               container: <Collection at /Plone/filter-example/collection-you-can-filter-down>
               root: <Application at >
               traverse_subpath: []
               user: <PropertiedUser 'admin'>
               default: <DEFAULT>
               repeat: <Products.PageTemplates.engine.RepeatDictWrapper object at 0x7f62e5962730>
               loop: {}
               target_language: None
               translate: <function BaseTemplate.render.<locals>.translate at 0x7f62e6757050>
               attrs: {'class': 'pat-leaflet', 'data-pat-leaflet': '${view/map_configuration}', 'data-url': '${view/ajax_url}', 'data-narrow-down-result': '${view/settings/narrow_down}', 'data-geojson': '${view/geojson_ajax_url}'}

@MrTango
Copy link
Contributor

MrTango commented May 27, 2021

Also there are JS errors which break the geo selection:

patterns.pat.leaflet: Failed while initializing 'leaflet' pattern. TypeError: t is null
    project bundle-leaflet-compiled.js:1389
    latLngToPoint bundle-leaflet-compiled.js:1429
    project bundle-leaflet-compiled.js:1925
    _getNewTopLeftPoint bundle-leaflet-compiled.js:2248
    _resetView bundle-leaflet-compiled.js:2064
    setView bundle-leaflet-compiled.js:8710
    init bundle-leaflet-compiled.js:15035
    c plone-base-compiled.js:3600
    e plone-base-compiled.js:3635
    o plone-base-compiled.js:3588
    initPattern plone-base-compiled.js:3427
    I plone-base-compiled.js:762

@petschki petschki restored the ajax-geojson branch May 28, 2021 09:25
@petschki
Copy link
Member Author

@petschki is this working for you in master? i get the folling error:

I've reverted PR and created a new one with portlet fix #130 ... though I didn't had any JS errors

@thet
Copy link
Member

thet commented May 28, 2021

Isn't the JS error because of the new constraint on updated plone.patternslib?

@petschki
Copy link
Member Author

just investigated this with @agitator ... there's a missing upgrade step in plone.patternslib which should update the last compilation date of bundle-leaflet. I'll update hat next week. @MrTango could you try to import the latest profile-plone.patternslib:default with portal_setup manually and give us feedback if that fixes the error?

@MrTango
Copy link
Contributor

MrTango commented May 29, 2021

i load the profile, but still have the js error while editing content.
I guess the portlet error does not depend on this anyway.
I id not update the code, so it's like a had it before you reverted you PR.

@MrTango
Copy link
Contributor

MrTango commented May 29, 2021

btw I'm using plone.patternslib master

@petschki
Copy link
Member Author

Some more investigations: in our Plone 5.2/py3 project with patternslib/master everything works without JS error. Since Plone 6 we get a JS error described here: plone/plone.patternslib#57 ... I think, this is the same as yours @MrTango (you need to enable debug mode and develop JS of bundle-leaflet and patternslib bundles ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants