Author values are duplicated to following items whose authors are empty

Created on 8 October 2023, about 1 year ago
Updated 10 October 2023, about 1 year ago

I was adding test coverage today when I discovered a problem with the new author parsing that was added for πŸ› Author field is not saved on aggregator item Fixed . Here's the sequence of events:

  1. An author is parsed by our reader extension
  2. One or more items that follow do not have an author
  3. The parsed author from step 1 is set on the items with no author

I found this by adding an assertion for the empty <author> tag item that's in aggregator_test_rss091.xml. The author that should have been empty wasn't. It had the author from several items before it. Once a new author was parsed by our extension, then that replaced the previous one in getting copied to following items.

The Laminas reader has an internal cache when parsing items (entries). If a function is called again for the same item, then you don't have to re-query the DOM. But for whatever reason that cache is getting copied from from entry to entry. I don't know why this is happening, but an easy fix is to not write to or read from the cache in our extension.

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States dcam

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024