Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order of items in a valid feed is not respected by the plugin #778

Closed
stefan-cotitosu opened this issue Jul 11, 2023 · 5 comments
Closed
Assignees
Labels
bug This label could be used to identify issues that are caused by a defect in the product. customer report Indicates the request came from a customer. doc-created This label will be used after the doc-needed request has been satisfied. doc-needed This issue requires documentation updates or additions once it has been completed.

Comments

@stefan-cotitosu
Copy link

Description

A customer is using a valid source and some of the items available here have the exact same date and time. The problem is that the order of the feeds is not the same as in the source.

https://app.newsloth.com/aura-com/UlFTUlBU.rss

Step-by-step reproduction instructions

  1. Use the shortcode approach and compare the order with the source
  2. Import the feeds with the [#item_content] magic tag and compare the order with the source

Screenshots, screen recording, code snippet or Help Scout ticket

Reported here: https://secure.helpscout.net/conversation/2297363333/377057/

Annotation-Annotation on 2023-07-11 at 17-24-21 png

shortcode-approach-feeds-date

import-feeds-order

Environment info

https://pastebin.com/dmjSXLtu

Is the issue you are reporting a regression

No

@stefan-cotitosu stefan-cotitosu added the bug This label could be used to identify issues that are caused by a defect in the product. label Jul 11, 2023
@pirate-bot pirate-bot added the customer report Indicates the request came from a customer. label Jul 11, 2023
@girishpanchal30
Copy link
Contributor

Hey @stefan-cotitosu,

I've reviewed this issue and found the issue with the default Feedzy/SimplePie date ordering.

Add the below code snippet in your active theme functions.php to disable default ordering.

/**
 * Modify feed config.
 *
 * @param object $feed SimplePie object.
 * @return void
 */
function feedzy_modify_feed_config_callback( $feed ) {
	if ( ! $feed->order_by_date ) {
		return;
	}
	$feed->enable_order_by_date( false );
}
add_action( 'feedzy_modify_feed_config', 'feedzy_modify_feed_config_callback' );

It seems to order by feed item index once the code snippet was added.
Ref: https://tinyurl.com/2prkglxt

Thanks

@irinelenache
Copy link

@girishpanchal30 Tested and the code snippet works as expected 🚀

@stefan-cotitosu
Copy link
Author

stefan-cotitosu commented Jul 20, 2023

Yes, I can confirm that it worked on the customer website, too.

Thank you, Girish. 🚀

@girishpanchal30 girishpanchal30 added the doc-needed This issue requires documentation updates or additions once it has been completed. label Jul 20, 2023
@AndreeaCristinaRadacina

Hi there @girishpanchal30,

I have a question regarding the code snippet.
Is it available for shortcode/widgets only? Or should it work for the feed to post too?

@girishpanchal30
Copy link
Contributor

@AndreeaCristinaRadacina It's worked for all

@AndreeaCristinaRadacina AndreeaCristinaRadacina added the doc-created This label will be used after the doc-needed request has been satisfied. label Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This label could be used to identify issues that are caused by a defect in the product. customer report Indicates the request came from a customer. doc-created This label will be used after the doc-needed request has been satisfied. doc-needed This issue requires documentation updates or additions once it has been completed.
Projects
None yet
Development

No branches or pull requests

6 participants