Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-08-23 14:13:54

smd_ksu
Member
Registered: 2008-12-23
Posts: 25

Fatal error: Call to a member function xpath()

Getting this error on my site on this page – http://www.frontierfarmcredit.com/blog/?c=crop-talk

Fatal error: Call to a member function xpath() on a non-object in /var/www/frontier2/textpattern/lib/txplib_misc.php(570) : eval()’d code on line 11

Anyone know what the cause could be?

Offline

#2 2012-08-23 14:27:15

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,470
Website

Re: Fatal error: Call to a member function xpath()

etc_query plugin uses xpath so the problem might relate to that.


BB6 Band My band
Gud One My blog

Offline

#3 2012-08-23 14:29:41

smd_ksu
Member
Registered: 2008-12-23
Posts: 25

Re: Fatal error: Call to a member function xpath()

Here are the plugins that are on the site:

adi_link
adi_mobile
bot_hide_per_section
bot_privs redbot
gbp_admin_library
gbp_permanent_links
ied_hide_in_admin
ign_password_protect
lam_browse_by
mdp_calendar
mg_setheader
rah_metas
rah_sitemap
rah_textile_bar Jukka Svahn
ras_delete_expired
ras_if_dates
rss_author_info
snt_weather_0.2
upm_date_archive
upm_file
upm_savenew
wet_article_thumb

Offline

#4 2012-08-23 14:33:44

smd_ksu
Member
Registered: 2008-12-23
Posts: 25

Re: Fatal error: Call to a member function xpath()

After looking at the plugins my guess is maybe snt_weather_0.2, as it uses xpath, but I have no idea how to fix whatever is causing the issue.

Offline

#5 2012-08-28 13:29:23

etc
Developer
Registered: 2010-11-11
Posts: 5,028
Website GitHub

Re: Fatal error: Call to a member function xpath()

It seems like the license key used in snt_weather has expired anyway.

Offline

#6 2012-08-28 14:06:07

smd_ksu
Member
Registered: 2008-12-23
Posts: 25

Re: Fatal error: Call to a member function xpath()

After doing some searching I think Google’s weather api was giving back an error because the plugin was checking it too often and I think Google limits the hits the api takes.

Offline

#7 2012-08-28 14:11:08

smd_ksu
Member
Registered: 2008-12-23
Posts: 25

Re: Fatal error: Call to a member function xpath()

Now it looks like Google has killed the weather api all together: http://thenextweb.com/google/2012/08/28/did-google-just-quietly-kill-private-weather-api/

Offline

#8 2012-08-28 21:38:00

etc
Developer
Registered: 2010-11-11
Posts: 5,028
Website GitHub

Re: Fatal error: Call to a member function xpath()

You can wrap the plugin output in aks_cache to avoid unnecessary api calls. And there is still a number of free weather apis, like weather.yahooapis.com. You can import its data with smd_xml or etc_query, like this:

<txp:aks_cache id="weather" hour="1" noreste="1">
<txp:etc_query markup="xml" url="http://weather.yahooapis.com/forecastrss?w=615702&u=c" query="//channel/item" wraptag="div">
  {title?} : {yweather:condition/@text?}. Temperature: {yweather:condition/@temp?}
  <img src="http://l.yimg.com/a/i/us/we/52/{yweather:condition/@code?}.gif" />
</txp:etc_query>
</txp:aks_cache>

Just check the source of weather.yahooapis.com/forecastrss?w=615702&u=c and choose the nodes you need.

Edit: wrapped in aks_cache.

Last edited by etc (2012-08-28 21:50:30)

Offline

#9 2012-08-28 21:42:18

smd_ksu
Member
Registered: 2008-12-23
Posts: 25

Re: Fatal error: Call to a member function xpath()

Thanks. Will give that a try.

Offline

Board footer

Powered by FluxBB