Products.cmfplone: Remove jquery.highlightsearchterms.js?

Created on 23 Oct 2016  路  9Comments  路  Source: plone/Products.CMFPlone

It's the last file on plone_ecmascripts folder: https://github.com/plone/Products.CMFPlone/blob/master/Products/CMFPlone/skins/plone_ecmascript/jquery.highlightsearchterms.js

Turn it into a pattern? Do we actually even want that? Opinions?

enhancement help cleanup normal moderate

Most helpful comment

i played a bit with this and it seems today it is pointless:

  • Since Google's move to secure search over https it does not have a query-string in its document.referrer anymore (so Bing, which we do not cover, but we support Altavista...)
  • plone live search does not have a referrer.

only when coming from detail search highlighting works.

I propose to remove the feature as is (it is just broken).

I started a mockup branch using mark.js (see reference above) - it's just a stub. It would need some love parsing our own query-string. Also, it would need some integration with live-search. If there are any takers...

All 9 comments

if we keep the feature, it should be turned into a pattern, IMO best living in mockup.

which is actually super easy to do.
just needs someone to do it.

@rodfersou do you want to take this challenge?

i played a bit with this and it seems today it is pointless:

  • Since Google's move to secure search over https it does not have a query-string in its document.referrer anymore (so Bing, which we do not cover, but we support Altavista...)
  • plone live search does not have a referrer.

only when coming from detail search highlighting works.

I propose to remove the feature as is (it is just broken).

I started a mockup branch using mark.js (see reference above) - it's just a stub. It would need some love parsing our own query-string. Also, it would need some integration with live-search. If there are any takers...

This bug is a major issue since it disallows the usage of the addPloneSite() which is necessary for creating Plone Site programmatically.

May you explain why this issue is related to creating a Plone Site?

Ah, its #2317

Why? Because the error is reproducible with the following code used for created a Plone 5.1.0 site as part of a small provisioning API. The error is reproducible even when you don't pass any extension profiles - naked Plone only.

class API(BrowserView):

    def recreate_plone_site(self):
        """ Recreate a Plone site """

        data = json.loads(self.request.BODY)
        site_id = str(data['site_id'])
        extension_ids = data['extension_ids']

        root = self.context.restrictedTraverse('/')
        if site_id in root.objectIds():
            print 'Deleting Plone site "{0}"'.format(site_id)
            root.manage_delObjects([site_id])

        print 'Creating Plone site "{0}" with {1}'.format(site_id, extension_ids)
        addPloneSite(root, site_id, extension_ids=extension_ids)
        print 'Created Plone site "{0}" with {1}'.format(site_id, extension_ids)

        self.request.response.setStatus(201)
        self.request.response.write('Created')

In addition to that, you end up with fresh, completely broken site layout

screenshot-dynamore zopyx de-5080-2018 03 09-15-36-41

Was this page helpful?
0 / 5 - 0 ratings