Page 1 of 1

Is the XML feed broken?

Posted: 19 Jan 2024, 12:07
by manuel
Hi,

I'm planning to use a XML feed for presenting vacancies on the website.

When I use [domainname]/xml on a hosted server I get a Server 500 error.
Working on a local Xampp with PHP7.2.0 I get the following errors:

Warning: Use of undefined constant LEGACY_ROOT - assumed 'LEGACY_ROOT' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\Cats\xml\index.php on line 37

Warning: include_once(LEGACY_ROOT/lib/CATSUtility.php): failed to open stream: No such file or directory in C:\xampp\htdocs\Cats\xml\index.php on line 37

Warning: include_once(): Failed opening 'LEGACY_ROOT/lib/CATSUtility.php' for inclusion (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\Cats\xml\index.php on line 37

Fatal error: Uncaught Error: Class 'CATSUtility' not found in C:\xampp\htdocs\Cats\xml\index.php:38 Stack trace: #0 {main} thrown in C:\xampp\htdocs\Cats\xml\index.php on line 38

I used the XML feed before with 0.9.2 version without any problems so I hope it's a small issue.

With kind regards,
Manuel

Re: Is the XML feed broken?

Posted: 19 Jan 2024, 14:47
by RussH
Hi Manuel,

yes it was broken and a very small fix. I've added this fix to the Github project https://github.com/opencats/OpenCATS/pull/636

If you want to apply this patch to your installation, all that's needed is to add this to /xml/index.php - after line 36
Code: Select all
chdir('..');                         <- EXISTING
include_once('config.php');          <- TO BE ADDED 

Re: Is the XML feed broken?

Posted: 24 Jan 2024, 14:29
by manuel
Hello Russh,

I've added the code and everything works fine now.

When using and importing XML I got a Greater Than Sign after the cityname.
I discoverd a small typo in "indeed.xptl"
At line 19
<city><![CDATA[$[jobCity]]]>></city> there is one Greater Than Sign to many just before </city>
It must be
<city><![CDATA[$[jobCity]]]></city>

Greetings
Manuel

Re: Is the XML feed broken?

Posted: 25 Jan 2024, 10:53
by RussH