PHP warning in cronjobs/rssimport.php

Author Message

Geoff Bentley

Sunday 12 October 2008 4:00:15 pm

When debugging cronjobs/rssimport.php I get:

<i>Warning: (PHP)
Undefined variable: linkURL in /var/www/ezpublish-4.0.1/cronjobs/rssimport.php on line 249</i>

I can't see where $linkURL comes from. Should it be $rssImport->attribute( 'url' ) instead?

Paul Wilson

Monday 13 October 2008 12:00:39 am

Hi Geoff,

This is just to rule something out rather than a definite answer...

Sometimes these types of errors come up when an incorrect version of PHP is running the cronjob. I've had multiple versions of PHP running on a server, with the default being an older version of PHP incompatible with eZ Publish 4.0.1.

To get the cronjob to run correctly, the correct version of PHP to run must be specified in the command line used to run the cronjob script.

If this is the problem, then some of the information here may help:
http://ez.no/developer/articles/how_to_import_and_export_rss_feeds/rss_import_ez_publish_cronjob_configuration

- Paul

Bruce Morrison

Monday 13 October 2008 1:03:33 am

Hi Geoff

It's only a warning triggered when an item that has already been imported is encountered, so apart from the annoying output the code should function correctly.

The quickest fix is to replace "$linkURL" with "$link->textContent||$guid->textContent".

Actually there is a bit of refactoring that could occur in this section of code.

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.