The function defined in the Drupal behavior attach property (js/views_timelinejs.js) is executed more than once when the page containing the timeline is viewed as logged in administrator/editor (i.e., with the admin toolbar). This results in a console error:
DOMMixins.js:35 Uncaught NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
at Rt.removeFrom (DOMMixins.js:35:19)
at Xe._initLayout (Timeline.js:403:22)
at Xe._onDataLoaded (Timeline.js:382:14)
as the 'removeChild' function is executed outside of the document context. Not sure, if only my environment is affected. The functionality of the timeline is not affected though, so the proposed fix below might be merely cosmetic.
Wrapping the content of the attach function (js/views_timelinejs.js) with
if (context === document) {
for (const key in settings.TimelineJS) {
...
}
}
seems to fix the JS error.
Active
4.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.