Keyword

Failed loading XML

  • Heather
  • Heather's Avatar Topic Author
  • Offline
  • New Member
More
2 years 11 months ago - 2 years 11 months ago #178711 by Heather
Failed loading XML was created by Heather
Ok, we have several sites using K2 and RSS Feed Reader.
I have a case where one site, if updated to the latest version of K2, no longer works with RSS Feed Reader. 
This site has the latest version of Joomla and RSS Feed Reader, I have set up reading feeds from two different sites with the latest version of K2. 
www.uab.edu/rsstest/

The sources:

www.uab.edu/k2test

www.uab.edu/k2test2

Both have latest version of Joomla 3.9.25 & K2 2.10.3 
Both feeds have been checked as valid from validator.w3.org/ and have results, not empty feed.

www.uab.edu/k2test/component/k2/itemlist/tag/psychology?format=feed&limitstart=&type=rss

www.uab.edu/k2test2/component/k2/itemlist/tag/athletics?format=feed&limitstart=&type=rss  

The second feed, from k2test2 does not show, this is the site when updated to K2 no longer works. 
Any feed created off this site breaks.

 Following off this ticket with developer: www.joomlaworks.net/forum/simple-rss-feed-reader/57572-warning-failed-loading-xml?start=10  

I have checked and the "FTP layer" is not enabled on either site in the Global Configuration settings.

Testing if the allow_url_fopen is disabled on our hosting account, using the code provided:

<?phpif (ini_get('allow_url_fopen')) {echo 'allow_url_fopen is enabled';} else {echo 'allow_url_fopen is disabled';}

All sites show allow_url_fopen is enabled 

Next step, contacted our server provider:

Look in .htaccess, php.ini or .user.ini files for anything that could affect remote connecting for your site, e.g. socket_set_timeout or stream_set_timeout.If that is set to 0, you need to change it to the default of 90 seconds.

Response from provider:

The default timeout for socket based streams in php 7.2 is 60 seconds and that is its current setting. This is however defined by the setting 'default_socket_timeout'. Both 'socket_set_timeout' and 'stream_set_timeout' appear to be functions that can be called in code but are not php.ini settings. If you want us to adjust the default to 90 let me know.


Is this something I need to ask our server provider to change, will it make a difference?
Thanks,
Heather 
Last edit: 2 years 11 months ago by Heather.

Please Log in or Create an account to join the conversation.

More
2 years 11 months ago #178750 by JoomlaWorks
Replied by JoomlaWorks on topic Failed loading XML
The "k2test2" URLs don't work. Pages are redirected to the main domain.

Additionally, your issue may be entirely different to the one referenced on that other link...

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Heather
  • Heather's Avatar Topic Author
  • Offline
  • New Member
More
2 years 11 months ago - 2 years 11 months ago #178829 by Heather
Replied by Heather on topic Failed loading XML
This is part of our problem, uab.edu/k2test2 is a clone of our news site, uab.edu/news.

The difference is k2test2 has the most current version of K2 on it and /news still has the 2.9 series of k2.
When we update the news site our feeds break.

These are the same site, cloned a few weeks ago so content will have been added but this feed should work.
Except k2test2 is update to 2.10 series of k2 and news is not.

www.uab.edu/k2test2/component/k2/itemlist/tag/academics?format=feed&limitstart=&type=rss
www.uab.edu/news/component/k2/itemlist/tag/academics?format=feed&limitstart=&type=rss
 
Last edit: 2 years 11 months ago by Heather.

Please Log in or Create an account to join the conversation.

More
2 years 11 months ago #178837 by JoomlaWorks
Replied by JoomlaWorks on topic Failed loading XML
Let me repeat... I CANNOT ACCESS the /k2test2 site. At all :)

It redirects to the main site.

Perhaps the redirect does not apply from within your organization or you use some security extension to block access externally etc. etc.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Heather
  • Heather's Avatar Topic Author
  • Offline
  • New Member
More
2 years 10 months ago #178851 by Heather
Replied by Heather on topic Failed loading XML
I'm sorry, you can't reach www.uab.edu/k2test2/ ?

We've tested the link with all the major browsers and have no issues, it's a public-facing site.

What browser are you using that is redirects to uab.edu/home instead?

Please Log in or Create an account to join the conversation.

More
2 years 10 months ago #178866 by JoomlaWorks
Replied by JoomlaWorks on topic Failed loading XML
Chrome latest on macOS.

The test site seems to load just fine now.

I checked this tag URL:
www.uab.edu/k2test2/arts/itemlist/tag/education

And as you also mentioned, its equivalent feed page renders an error:
www.uab.edu/k2test2/arts/itemlist/tag/education?format=feed

Since the problem is masked by the redirect to your default site error page, I used cURL to fetch the feed page without the redirect. This revealed the following error:
Call to undefined method Joomla\CMS\Document\FeedDocument::addCustomTag()

Now, K2 uses this method in one place only: github.com/getk2/k2/blob/dd3a4c9070f7f1628a0c622e4c4c2996f1e2f630/administrator/components/com_k2/helpers/html.php#L396

And this is actually the backend, so it's not K2.

My guess is some plugin uses that method to inject something to the document <head>. The problem is that this plugin does not check for "context": is this a regular HTML output or is a feed or json output?

So look for the word "addCustomTag" in your site's /plugins folder and you should spot the rogue plugin. It's most likely something that appends (duh) something in the <head>, e.g. for analytics or other stuff that would normally be injected there.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Heather
  • Heather's Avatar Topic Author
  • Offline
  • New Member
More
2 years 10 months ago #178917 by Heather
Replied by Heather on topic Failed loading XML
Thank you for looking into this, the issue was a plugin called Phoca.
Once we removed that, everything works.
We will replace using it with a similar extension, Tagz which doesn't cause issues with the feeds.

Thank you.

Please Log in or Create an account to join the conversation.

More
2 years 10 months ago #178954 by JoomlaWorks
Replied by JoomlaWorks on topic Failed loading XML
You're welcome. Keep in mind that K2 already has powerful structured data output (if that's what you were looking for with that other plugin). Have a look at the settings under the SEO tab in K2's component settings.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum