currently the plugin relies on the display attribute and a selection via class based on the display attribute to determine what element should be setup with owlCarousel.
because the display attribute is not guaranteed to be unique, there are some situations where having multiple carousels on the same page can cause unexpected behavior and duplicated listings to be shown.
this PR changes the html output for the carousel widget and shortcode to instead use a unique id generated with uniqid() to avoid the unexpected behavior.
Verification Process
setup an IDX Broker account so that you can pull in 1 featured listing via shortcode (like with an agentid set) and multiple supplemental listings via shortcode (by creating several supplemental listings).
create a page within a WordPress site with IMPress 3.0.10 that has two carousel widgets or shortcodes with the display attribute for each set to the same number (like 3), with the supplemental shortcode first followed by the featured shortcode (so that the widget with only a single listing appears after the widget with more listings)
publish the page and note that the second widget has its single listing duplicated. (see screenshot for example on live test site)
re-arrange the widgets so that they're in the opposite order. publish and note the different behavior (see screenshot, where the widgets are both set to display 3 but only a single listing is shown at a time for both)
install version of plugin with fixes in PR applied. note that the behavior has been resolved and each widget is displaying listings as expected without duplication or limitation. (see screenshot)
Release Notes
Fix: corrected display of listings in carousel widgets when multiple carousel widgets on a single page shared the same display attribute
Review
Pull Requests must have the sign-off of two other developers and at least one of these must be an IDX Broker team member.
Pull Requests
🐛 Are you fixing a bug? Yes
Description of the Change
currently the plugin relies on the display attribute and a selection via class based on the display attribute to determine what element should be setup with owlCarousel.
because the display attribute is not guaranteed to be unique, there are some situations where having multiple carousels on the same page can cause unexpected behavior and duplicated listings to be shown.
this PR changes the html output for the carousel widget and shortcode to instead use a unique id generated with uniqid() to avoid the unexpected behavior.
Verification Process
setup an IDX Broker account so that you can pull in 1 featured listing via shortcode (like with an agentid set) and multiple supplemental listings via shortcode (by creating several supplemental listings).
create a page within a WordPress site with IMPress 3.0.10 that has two carousel widgets or shortcodes with the display attribute for each set to the same number (like 3), with the supplemental shortcode first followed by the featured shortcode (so that the widget with only a single listing appears after the widget with more listings)
publish the page and note that the second widget has its single listing duplicated. (see screenshot for example on live test site)
Release Notes
Fix: corrected display of listings in carousel widgets when multiple carousel widgets on a single page shared the same display attribute
Review
Pull Requests must have the sign-off of two other developers and at least one of these must be an IDX Broker team member.