Duplicate posts
-
I’m getting multiple posts of the same items from one feed in my list. Let me know what documentation I need to provide to analyze and fix this problem.
https://www.eswr.com/enviro_links
Thanks.
-
system info
### Begin System Info ###
## Please include this information when posting support requests ##
Multi-site: No
SITE_URL: https://www.eswr.com
HOME_URL: https://www.eswr.comPlugin Version: 4.6
WordPress Version: 3.9.2Platform: Windows
Browser Name: Firefox
Browser Version: 32.0
User Agent String: Mozilla/5.0 (Windows NT 6.1; WOW
64; rv:32.0) Gecko/20100101 Fire
fox/32.0PHP Version: 5.4.32
MySQL Version: 5.5.38-35.2-log
Web Server Info: ApachePHP Safe Mode: No
PHP Memory Limit: 256M
PHP Post Max Size: 10M
PHP Time Limit: 30WP_DEBUG: Disabled
WP Table Prefix: Length: 3 Status: Acceptable
Show On Front: posts
Page On Front: #0
Page For Posts: #0Session: Disabled
Session Name: PHPSESSID
Cookie Path: /
Save Path: /tmp
Use Cookies: On
Use Only Cookies: OnUPLOAD_MAX_FILESIZE: 10MB
POST_MAX_SIZE: 10MB
WordPress Memory Limit: 40MB
DISPLAY ERRORS: N/A
FSOCKOPEN: Your server supports fsockopen.ACTIVE PLUGINS:
Advanced Image Styles: 0.2
Akismet: 3.0.2
BackWPup: 3.1.2
Catch IDs: 1.2.1
Easy Table: 1.5.2
Google Ajax Search: 1.2
Google Analytics by Yoast: 5.0.6
Interactive Maps: 0.3
My Link Order: 3.5
s2Member Framework: 140816
Shareaholic | share buttons, analytics, related content: 7.5.0.4
Widget Logic: 0.57
WP RSS Aggregator: 4.6DEACTIVATED PLUGINS:
Exec-PHP: 4.9
FontMeister – The Font Management Plugin: 1.04
Interactive World Maps: 1.3.8
Shadowbox JS: 3.0.3.10.2
Shadowbox JS – Use Title from Image: 3.0.3.10.2
Subscribe2: 10.11CURRENT THEME:
Suffusion: 4.4.7
### End System Info ###
Can you kindly send us the URL(s) of the feed source(s)?
This is typically caused by a problem with the feed source not specifying permalinks for its feed items.
https://feeds.feedburner.com/CenterForBiologicalDiversityPressReleases
I think that’s what it is. The latest duplicates from the feed I’m having trouble with are
https://feedproxy.google.com/~r/CenterForBiologicalDiversityPressReleases/~3/REcQ0TisgN8/url
https://feedproxy.google.com/~r/CenterForBiologicalDiversityPressReleases/~3/atqQWWjz3yA/url
https://feedproxy.google.com/~r/CenterForBiologicalDiversityPressReleases/~3/SOPDTrPKUDQ/url
and there are a few more different links for the same item
Hi stevedavieseswr.
I understand that all these URLs point to the same article. This is because when you access it in the browser, it goes through 2 redirects: a 301 and a 302; the latest one redirects the browser to the actual article URL.
Unfortunately, without first going to each URL in the sequence it is not possible to normalize feedproxy.google.com URLs into their actual form. If you really need to do this, however, then read below to find out how.
includes/feed-importing.php
uses thewprss_normalize_permalink()
function to convert URLs into their unique, canonical forms. It is possible to hook into this function using awprss_normalize_permalink
filter. This filter will receive the permalink as it’s first and only parameter, and should return the normalized permalink. The lowest priority used by WP RSS Aggregator for these filters is8
, so you should add the filter with priority of7
. This is because the filter added by the system with priority8
is made to process Google News URLs, such as the URL to which the response of the first request will redirect.In the filter, you are going to have to process the permalink in order to normalize it. This is the tricky part. You are going to have to use PHP’s cURL library, or any other alternative, to make a request. Here’s a helpful article on how this can be done. After you receive the responce, you will have to get the
Location
header; it’s value should contain the URL that you need to return from the filter. To retrieve the header from the response you would need to use theCURLOPT_HEADER
option.I appreciate that this is no trivial task. However, this is currently the only way to achieve what you want, since the feed itself does not provide the URLs in the form you need.
I hope this helps.
Thank you for taking the time to respond. I confess, it’s more complicated than I’m probably able to handle, but I will give it a try at some point.
To the Internet Gods I say, “Can nothing be simple?”
- The topic ‘Duplicate posts’ is closed to new replies.