Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-11-13 11:31:57

vanderkerkoff
Member
Registered: 2005-05-26
Posts: 45

problem after upgrade to 4.0.5

Hello everyone

We’ve written a bit of code into the publish.php file in order to strip out the 3rd section of an url in order to pull data from a static xml file and display it, it looks like this.

function glam_title($u3) { if ($u3 != ‘’) { global $glam_id_no ; $glam_id_no = $u3 ; } }

it works fine in 4.0.2, but in 4.0.5 it’s not working.
Anybody got any ideas why?

Any help is as always greatly appreciated.

Offline

#2 2007-11-13 12:40:25

vanderkerkoff
Member
Registered: 2005-05-26
Posts: 45

Re: problem after upgrade to 4.0.5

ok, I’m reasonably certain that its not global that isn’t working, otherwise half the site would fall over :-)

when I’m reading the data from the xml file I think xpath is failing

$sxe = simplexml_load_file(“/www/htdocs/assets/xmlevents.xml”); foreach($sxe->xpath(‘//event[id = ‘.$testnum.’]’) as $item) {

That works fine in 4.0.2, but not in 4.0.5, can someone please give me a hand here, I was told be everyone that upgrading was really easy.

hmmm

Offline

#3 2007-11-13 13:26:03

vanderkerkoff
Member
Registered: 2005-05-26
Posts: 45

Re: problem after upgrade to 4.0.5

ahh, i think I can see what I’m doing wrong

on the download 4.0.5 page there’s a new xml-rpc out, so I’ve downloaded that and installed it.

I’m having trouble following the instruction though on this page

http://textpattern.com/download-rpc

Can anyone tell me what this means?

Configure your client
XML-RPC endpoint http://mysite.com/rpc/
User Your Textpattern user login
Password Your Textpattern user password

I have no idea what file to change, or if it’s not a file, or what the client is. Is the client textpattern?

Any help greatly appreciated.

Offline

#4 2007-11-13 14:00:01

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: problem after upgrade to 4.0.5

Can anyone tell me what this means?

Detailed explanation about how to configure some desktop clients – as the link says, use those for you desctop XML-RPC API client.

But is XML-RPC what you’re after? Ain’t you wanting to show something on your webpage? As you said earlier:

in order to pull data from a static xml file and display it

function glam_title($u3) { if ($u3 != ‘’) { global $glam_id_no ; $glam_id_no = $u3 ; } }

What does that code do? Makes coffey? That ain’t saing nothing because it ain’t complete. Could you use just a simple plugin?

Cheers!

Last edited by Gocom (2007-11-13 14:03:26)

Offline

#5 2007-11-13 14:15:16

vanderkerkoff
Member
Registered: 2005-05-26
Posts: 45

Re: problem after upgrade to 4.0.5

Thanks for getting back to me GoCom

I found out what the problem was.

In 4.0.2 if the main article that was then passing the 3rd section of the URL to the XML call was set to sticky, it worked.

It didn’t in 4.0.5, so unstickying the article was all that needed to be done.

:-)

function glam_title($u3) { if ($u3 != ‘’) { global $glam_id_no ; $glam_id_no = $u3 ; } }

That function takes the vlaue of $u3 if it’s not blank and sets a global variable called $glam_id_no to be the value of $u3.

Thanks for replying.

Offline

#6 2007-11-13 17:49:00

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: problem after upgrade to 4.0.5

Nice you sorted it. But unfornaturely, my nick is Gocom with one capital/uppercase. I’m not japanise it-company (well i’m planning to sell my human body to devil and turn it to working company-facility) :)

Cheers!

Offline

Board footer

Powered by FluxBB