FLUID-5332: Renderer's data binding will continue with notifications after source markup is destroyed

Metadata

Source
FLUID-5332
Type
Bug
Priority
Major
Status
Closed
Resolution
Won't Fix
Assignee
Antranig Basman
Reporter
Antranig Basman
Created
2014-04-28T02:00:31.562-0400
Updated
2021-08-08T13:44:52.825-0400
Versions
N/A
Fixed Versions
  1. 5.0
Component
  1. Renderer

Description

This issue was noticed during work on the metadata component - a failing version was checked in at https://github.com/jobara/metadata/tree/FLOE-116-broken-resolution (commit is https://github.com/jobara/metadata/commit/2f4fb58228493439f556d53c5606ca97f9081158 ).

This failure can be observed by entering a new video URL and then operating one of the checkboxes (not the radio buttons) at the right panel. This issue was provoked by a bug in the configuration for the metadata component - two listeners were registered against the panel's model in two different locations, each of which triggered a call to "updateModel".
The first of these triggered a call to refreshView in the parent component, which under the current renderer model must destroy and recreate the subcomponent - by the time the duplicate model listener executes, the target markup and component have already been destroyed. This triggers a particularly incomprehensible IoC resolution message complaining - Failed to resolve reference

.model - could not match context with name panel from component ....

Note that this is currently an "old-style" model component and so the listener loop during which the component destruction occurs is "fireAgglomerated" inside the old ChangeApplier implementation. This is a particularly inaccessible location and the best solution would be to wait for the framework to be rationalised somewhat so that we can deal with the issue in just one place, the new ChangeApplier. However, this would also require advanced support for a new event facility described in FLUID-5333, "abortable events"

This issue was discussed in IRC on 24/4/14 currently logged at https://botbot.me/freenode/fluid-work/2014-04-24/ .

This issue is related to FLUID-4890 in that at least the fix for that issue would result in a much better diagnostic, failing in the listener early with the message that the component had been destroyed.

Comments

  • Antranig Basman commented 2021-08-08T13:44:52.805-0400

    The old renderer will be retired in Infusion 5.x and no further improvements will be made to it.