WebHare community

WebHare 4.22 is done!


WebHare 4.22 has been promoted to the next stable release, and is now ready for final testing and deployment. The ‘master’ branch is now numbered 4.23.

We’d also like to announce our upcoming documentation site https://www.webhare.dev/. We’re currently building the site around a getting started manual and although far from finished, feedback on the general direction (pace of the content and inscope) is already appreciated. Expect a lot of updates on this website in the coming weeks.

We also intend to de-emphasize email and the slack channels for support as a forum like this should be better for archiving and allows us to use it as a base to update the documentation site.

Last but not least, some projects are moving to new locations in preparation for open sourcing WebHare. Specifically, the proxy server project has moved to GitLab as https://gitlab.com/webhare/proxy, and is now webhare/proxy on Docker - you may need to update some scripts.

Other projects will slowly start moving to https://gitlab.com/webhare/ too, and only internal/customer projects will remain on our own gitlab.

Incompatibilities and deprecations

  • The canonicalization API for XML has been updated
  • XMLAttr no longer derives from XMLNode. Children of XMLAttrs can no longer be manipulated.
  • We no longer autoinstall the webpack module during upgrades. If you still need it and are upgrading from 4.17 or below, you’ll have to install it manually
  • The tollium_dev module has been dropped. If you are still seeing artifacts, wh module delete tollium_dev to get rid of your local version.
  • Relative URLs in CSS url() fields must now be correct, previous versions also looked in parent directories for matches.
  • In javascript assetpacks, now only features from the standard are polyfilled. For example, Array.slice(arr, func) and Array.forEach(arr, func) won’t work anymore.
  • WebHare will clean data in its output folder that’s no longer associated with a site. If you’re manually maintaining output (eg in a foreign folder)
    you should move this content outside the output tree and use an access rule to make it available
  • Added STATUSRECORD type to WRD, combining a status and other cells, but speeding up searches by ‘status’. This field is intended to store eg. newsletter subscription/consent data.
  • wh-form__button--submitlabel, wh-form__button--previouslabel, wh-form__button--nextlabel and wh-form__uploadbuttonlabel have been removed from the form buttons and replaced with
    a generic wh-form__buttonlabel.
  • RunConsilioSearch returns summary as before and no longer a _summary. You can specify the exact name you want for the summary as an option

Things that are nice to know

  • A ‘link’ member has been added to system.fs_objects. We now recommend using this over ‘indexurl’ or ‘url’.
    • and ‘url’ has been now been made available as ‘objecturl’, but you probably never want to use it unless you’re writing low level URL functions
  • The consenthandler can automatically set and handle consent overlays over elements requiring consent (see consenthandler.md)
  • A new siteprofile element <videowidget>. Setting it adds thumbnail and click-to-play to video elements.
    • <videowidget breakpoints=> to generate lower resolution video thumvs
    • <videowidget requireconsent=> to link the videowidget to automatich consent handling
  • WebHare will now automatically clean output for sites that are no longer published, or published to a different locations. The output
    is first archived for 7 days (normally to /opt/whdata/output/.archive) and then deleted.
  • Added IsModuleInstalled as a cleaner way to check than testing GetModuleInstallationRoot for an non-empty result.
  • <downloadaction>s can now add an ondownloadstarted= handler which will signal when the download was actually started. (eg to close the window waiting for the download to start)
  • Form rendered buttons now add a wh-form__buttonlabel class to the <span> inside the <button>.
  • WRD can now keep history for entities (by setting keephistorydays to the number of days to remember changes)
  • New XML DOM apis ListChildren, ListElements and GetAllChildNodes which replace various inefficient live nodelist returning functions (eg GetElementsByTagNameNS, childnodes).
    Live nodelists are especially inefficent if the Item and Length calls are used, instead of immediately converting the lists to an OBJECT ARRAY using GetCurrentElements or
    GetCurrentNodes. You can do the following conversions:
    • GetElementsByTagName(x) -> ListElements("",x)
    • GetElementsByTagNameNS(ns,x) -> ListElements(ns,x)
    • GetChildElementsByTagName(x) -> ListChildren("",x)
    • GetChildElementsByTagNameNS(ns,x) -> ListChildren(ns,x)
    • childnodes->GetCurrentNodes() -> GetAllChildNodes()
    • childnodes->GetCurrentElements() -> ListChildren("*","*")
  • WRD %GetEntityFields now also accepts a RECORD instead of just a STRING ARRAY, just like the outputcolumns in a WRD query
  • You can now directly have WRD resize an image on request by using the %WrapImageField function in your query list, eg:
      [ imglink := WrapImageField("IMG", [ method := "fit"
                                         , setwidth := 100
                                         , setheight := 100
  • <p:embedvideo> now supports limitnetworks= parameter to disable choices from the pulldown, eg limitnetworks="youtube vimeo"
  • RTD anchors now use the class ‘wh-anchor’. ‘wh-rtd__anchor’ is still added but now deprecated
  • Formgroup now add a <a class="wh-anchor"> to the top of their groups as the element to scroll into view when focusing a group.