Time_quantity issue
-
Hi, we are using the plugin in order to generate a feed with popular post data.
We are experiencing an issue when using the parameter “time_quantity”. When we set it to “72” the description balise is always sending the same picture.
The page I need help with: [log in to see the link]
-
Hi there,
Can’t say what’s going on without looking at your code so please share it here (use pastebin.com) so I can have a look.
Also, what do you mean with “the description balise is always sending the same picture”?
Hi thank you for your support.
Here comes additional details about the bug. When using the REST “/popular-posts” web service, the returned XML content always return the first article image URL in the “<description>” tag, within the “channel.item” tag. Indeed, this “<description>” tag contains some HTML starting with “<img src=” statement and the “src” attribute is set to the same value for all articles.
I attached an excerp of web service response body.Do you think that you can fix this bug, please?
Best regards.
Alan[ HTML deleted, don’t post that here ]
-
This reply was modified 6 years, 4 months ago by
Jan Dembowski.
-
This reply was modified 6 years, 4 months ago by
Jan Dembowski.
@alanghenassia Please do not post large code or responses like that here, it doesn’t work after ~10 lines or so.
If you need share that data please use https://pastebin.com/ instead and post the link to that paste.
There you go https://pastebin.com/ERmQpdHK
@alanghenassia I need to see the PHP code you’re using to generate the feed. The feed itself isn’t useful as it has been already built by your code and so I can’t see what’s going on.
Alternatively, did you know there’s a plugin to generate a RSS feed of popular posts?: WordPress Popular Posts Feed.
We are not using any PHP code. We are using you plugin as it is. We are also using the wordpress popular post feed.
Do you think we could jump on a private talk in order to share our feed to let you understand the issue ?
Thanks
You mentioned that you’re using the
time_quantityparameter. If you’re not using PHP, then how exactly are you using it? Are you passing it as an URL parameter?Yes it is.
We are using the URL
<webSiteUrl>/popular-posts/?range=custom&time_unit=hour&time_quantity=72. We didn’t write any PHP code and we use what is called “REST API” in the plugin documentation.Ok, so the problem is the WordPress Popular Posts Feed plugin then. I’m not sure if you can use REST parameters with the WPP Feed plugin, it’s been a while since I last looked at its code and I honestly don’t remember. Maybe that’s the problem (you trying to use REST parameters with a RSS feed.) I’ll have a look into this as soon as I can.
Hey @alanghenassia,
So I played around a bit with the WordPress Popular Posts Feed plugin and the RSS feed that the plugin generates doesn’t accept any parameters so I’m a little confused as to why you think it does take parameters. I tried your feed and it doesn’t seem to change despite passing it different variables either so you’re probably confused about how the WPP Feed plugin works.
Also, I rechecked the Pastebin code you shared before and the feed structure is actually different from the one that the WordPress Popular Posts Feed plugin outputs. The URL of the feed is different too: the WPP Feed plugin generates an URL like
https://www.example.com/feed/popular-posts/while in your case the feed is located athttps://passed.fr/popular-posts.All of these differences (the output being different, the URL of the feed being different) make me believe you/your developer customized the WPP Feed plugin either via filter hooks or by changing code manually so it includes the image in the
descriptionnode (among other changes.) Because of that, you’ll have to reach out to your developer and ask them to look into the image issue for you since your site isn’t using the WPP Feed plugin the way I built it.If there’s anything else I can do to help out please let me know.
-
This reply was modified 6 years, 4 months ago by
The topic ‘Time_quantity issue’ is closed to new replies.