Codeinwp / Codeinwp/feedzy-rss-feeds

Feed Order labels select the opposite chronological import order

Open
#1,336 1 comment 0 reactions 1 assignee View on GitHub

@girishpanchal30 is already working on this.

Since Sep 17, 2026.

  • #1338 by @girishpanchal30 — open
bug-report bug-report-triage customer report
Dominant language
PHP
Stars
121
Forks
27
Avg merge
2d 1h
Merged PRs (30d)
11

Description

Summary

The campaign Feed Order control produces the opposite chronological result for its newest-first and oldest-first choices. Selecting Latest items first is expected to import newer entries before older entries, but the inspected path sorts older entries first. This prevents campaigns from reliably selecting the newest limited set without choosing the oppositely labeled option.

Customer context

Product / area: Feedzy RSS Feeds, feed-to-post campaign ordering
Version: Not provided; the behavior is present in current source through v5.2.9
Environment: WordPress environment details not provided
Integration / third party: Dozens of RSS sources were reportedly tested
Reported error / symptom: Newest-first produces the opposite chronological import order
Impact: The customer cannot select the ten newest entries using the matching UI label

Reproduction notes

  1. Create or edit a Feedzy import campaign using an RSS fixture with known publication timestamps.
  2. Select Latest items first under Step 4 → General feed settings → General → Items.
  3. Limit the import and run it.
  4. Observe that older entries precede newer entries.

Repository-confirmed from the selected token and comparator; an isolated runtime fixture was not executed during triage.

Diagnosis

Conclusion

The campaign UI maps Latest items first to date_asc, while the reachable import path passes that token to a comparator that places an item after another item when its timestamp is newer. This produces oldest-first ordering for the newest-first choice. The staff response independently reports that both labels are reversed.

Where this likely occurs
  • Campaign control: includes/views/import-metabox-edit.php — Feed Order selector in Feedzy_Rss_Feeds_Import::feedzy_import_feed_options() approx. lines 942–965 maps date_asc to Latest items first and date_desc to Oldest items first.
  • Import data flow: includes/admin/feedzy-rss-feeds-import.phpFeedzy_Rss_Feeds_Import::run_job_logic() lines 1880–1902 passes persisted import_order directly as the sort option.
  • Sorting behavior: includes/util/feedzy-rss-feeds-util-feed.phpFeedzy_Rss_Feeds_Util_Feed::sort_items() lines 76–87 returns a positive comparison for date_asc when the first item's timestamp is newer, placing newer entries later.
  • History: commit 2bc201f559c5ba08ce8fbb0f247ea88e1eaa0f0b introduced the campaign selector and mapping; the first containing release is v5.1.0. The behavior remains in v5.2.9.
Engineering notes

The UI value is persisted as campaign metadata and consumed without remapping. The date sorting implementation predates the campaign labels. Existing saved campaigns may therefore depend on the token behavior despite the contradictory labels. Pro does not override this campaign sorting path; ownership is in the free repository.

Test coverage status

tests/test-plugin.phpTest_Feedzy_Plugin::test_shortcode_order_param() lines 81–117 checks title sorting only. tests/test-import.phpTest_Feedzy_Import::test_feedzy_imports() beginning at line 63 exercises imports without setting or asserting import_order. The Pro E2E suite tests/e2e/specs/common/import.spec.js lines 43–77 verifies label text and the default selection but not resulting item chronology.

What to verify or explore next
  • Reproduce campaign runs against a deterministic fixture containing out-of-order publication dates for each Feed Order choice.
  • Verify item limiting occurs after chronological sorting for a ten-item campaign.
  • Run the import PHPUnit suite and the Pro common import E2E suite with chronology assertions.
Unknowns / follow-up

The ticket does not provide the installed Feedzy version. The attachment could not be retrieved through the sanctioned ticket-image tool.

Confidence

Confidence: 98/100

Repository inspection directly confirms that the campaign UI maps newest-first to an ascending date comparator, and that the preview path supplies a fixed sort value instead of the saved campaign selection. No matching open issue was found.


Source: HelpScout #3452624552
Generated by bug-report-triage (ID: bug-report-triage_6aaa5ab4e62834.92507993)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.