I was testing feedapi on -r DRUPAL-6, and got these notices:

notice: Undefined index: type in /home/balu/projects/drupal/6/planetsoc/sites/all/modules/feedapi/feedapi.module on line 474.

Even more weird error jumps up when I hit node/add/feedapi-node:

* notice: Undefined index: type in /home/balu/projects/drupal/6/planetsoc/sites/all/modules/feedapi/feedapi.module on line 474.
* notice: Undefined property: stdClass::$feedapi_node in /home/balu/projects/drupal/6/planetsoc/sites/all/modules/feedapi/feedapi_inherit/feedapi_inherit.module on line 33.
* notice: Trying to get property of non-object in /home/balu/projects/drupal/6/planetsoc/sites/all/modules/feedapi/feedapi_inherit/feedapi_inherit.module on line 33.
* notice: Undefined index: values in /home/balu/projects/drupal/6/planetsoc/sites/all/modules/feedapi/feedapi.module on line 486.
* notice: Undefined property: stdClass::$feed in /home/balu/projects/drupal/6/planetsoc/sites/all/modules/feedapi/feedapi.module on line 489.
* notice: Trying to get property of non-object in /home/balu/projects/drupal/6/planetsoc/sites/all/modules/feedapi/feedapi.module on line 489.
* notice: Undefined index: values in /home/balu/projects/drupal/6/planetsoc/sites/all/modules/feedapi/feedapi.module on line 492.
* notice: Undefined variable: feedapi_url_default in /home/balu/projects/drupal/6/planetsoc/sites/all/modules/feedapi/feedapi.module on line 499.
* notice: Undefined variable: form in /home/balu/projects/drupal/6/planetsoc/sites/all/modules/feedapi/feedapi_inherit/feedapi_inherit.module on line 77.
* notice: Undefined variable: form in /home/balu/projects/drupal/6/planetsoc/sites/all/modules/feedapi/feedapi_node/feedapi_node.module on line 147.
* notice: Undefined index: parser_common_syndication in /home/balu/projects/drupal/6/planetsoc/sites/all/modules/feedapi/feedapi.module on line 519.
* notice: Undefined property: stdClass::$nid in /home/balu/projects/drupal/6/planetsoc/sites/all/modules/feedapi/feedapi.module on line 543.

Comments

mustafau’s picture

Version: 6.x-1.2 » 6.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new4.5 KB

I have created a patch to fix these error.

webchick’s picture

StatusFileSize
new6.01 KB

I still get:

    * notice: Undefined property: stdClass::$modified in /var/www/planetsoc/drupal5/modules/node/node.module on line 499.
    * notice: Undefined property: stdClass::$locked in /var/www/planetsoc/drupal5/modules/node/node.module on line 499.
    * notice: Undefined property: stdClass::$orig_type in /var/www/planetsoc/drupal5/modules/node/node.module on line 499.

...when first installing the FeedAPI Node module.

This patch is the same as above, but also fixes these notices.

webchick’s picture

Status: Needs review » Needs work

Ugh. No, there are still a bunch...

On fresh node creation:

Undefined property: stdClass::$nid in /var/www/planetsoc/drupal5/sites/all/modules/feedapi/feedapi.module on line 544.

after you fix that one:

Undefined variable: settings in /var/www/planetsoc/drupal5/sites/all/modules/feedapi/feedapi.module on line 547.

after you fix that one:



    * notice: Undefined index: refresh_on_create in /var/www/planetsoc/drupal5/sites/all/modules/feedapi/feedapi.module on line 1345.
    * notice: Undefined index: update_existing in /var/www/planetsoc/drupal5/sites/all/modules/feedapi/feedapi.module on line 1345.
    * notice: Undefined index: skip in /var/www/planetsoc/drupal5/sites/all/modules/feedapi/feedapi.module on line 1345.
    * notice: Undefined index: items_delete in /var/www/planetsoc/drupal5/sites/all/modules/feedapi/feedapi.module on line 1345.
    * notice: Undefined index: processors in /var/www/planetsoc/drupal5/sites/all/modules/feedapi/feedapi.module on line 1349.

:(

This is going to take too much time for me to look into atm.

mustafau’s picture

Status: Needs work » Needs review
StatusFileSize
new6.27 KB

This patch seems to fix all of those notices.

mustafau’s picture

Status: Needs review » Needs work

Following notices are remaining:

* notice: Undefined index: #validate in feedapi.module on line 1351.
* notice: Undefined index: defaults in feedapi.module on line 1351.
* notice: Undefined index: refresh_on_create in feedapi.module on line 1347.
* notice: Undefined index: update_existing in feedapi.module on line 1347.
* notice: Undefined index: skip in feedapi.module on line 1347.
* notice: Undefined index: defaults in feedapi.module on line 1351.
* notice: Undefined index: x_dedupe in feedapi.module on line 1347.
mustafau’s picture

StatusFileSize
new8.12 KB

Following notices are shown on non FeedAPI-enabled node form. Updated patch fixing these notices is attached.

    * notice: Undefined property: stdClass::$feedapi_node in feedapi_node\feedapi_node.module on line 39.
    * notice: Trying to get property of non-object in feedapi_node\feedapi_node.module on line 39.
    * notice: Undefined property: stdClass::$feedapi_node in feedapi_node\feedapi_node.module on line 33.
    * notice: Undefined property: stdClass::$feedapi_node in feedapi_node\feedapi_node.module on line 83.
mustafau’s picture

StatusFileSize
new15.89 KB

I found following notices:

    * notice: Undefined property: stdClass::$headers in parser_common_syndication\parser_common_syndication.module on line 165.
    * notice: Undefined property: stdClass::$data in parser_common_syndication\parser_common_syndication.module on line 172.
    * notice: Undefined property: stdClass::$headers in parser_common_syndication\parser_common_syndication.module on line 168.
    * notice: Trying to get property of non-object in parser_common_syndication\parser_common_syndication.module on line 65.
    * notice: Trying to get property of non-object in feedapi.module on line 1265.
    * notice: Undefined property: stdClass::$title in feedapi.module on line 563.
    * notice: Undefined property: stdClass::$description in feedapi.module on line 567.

Updated patch fixing all but following is attached.

    * notice: Trying to get property of non-object in feedapi.module on line 1265.
    * notice: Undefined property: stdClass::$title in feedapi.module on line 563.
    * notice: Undefined property: stdClass::$description in feedapi.module on line 567.
aron novak’s picture

Thanks a lot to all of you to providing the patches! (while i was struggling at the university, FeedAPI become better continuously :D )
But I'm curious why these messages appear. I have never seen those messages and even more important:
http://php.net/manual/en/function.error-reporting.php

// Report all errors except E_NOTICE
// This is the default value set in php.ini
error_reporting(E_ALL ^ E_NOTICE);

So by default, notices are not displayed. Do all of you use non-default value? Is there such a module which alters this default behavior?

webchick’s picture

^ E_NOTICE is only added for releases of Drupal. Dev tarballs and CVS checkouts (-r DRUPAL-6) report E_ALL.

aron novak’s picture

Status: Needs work » Fixed

Ahha, i always use official releases. This explains everything. :)
Anyway, the patch is fixed and i also killed some possible notice-source.

Please reopen if a notice appears and give the number of the line and the revision of the code.

mustafau’s picture

Status: Fixed » Active

Following notices are remaining:

# notice: Undefined property: stdClass::$nid in feedapi.module on line 977.
# notice: Undefined property: stdClass::$code in parser_common_syndication\parser_common_syndication.module on line 152.
# notice: Undefined property: stdClass::$headers in parser_common_syndication\parser_common_syndication.module on line 171.
# notice: Trying to get property of non-object in parser_common_syndication\parser_common_syndication.module on line 65.
mustafau’s picture

More notices:

    * notice: Undefined index: #validate in feedapi.module on line 1352.
    * notice: Undefined index: defaults in feedapi.module on line 1352.
    * notice: Undefined index: nid in feedapi.module on line 1034.
mustafau’s picture

StatusFileSize
new691 bytes

Following notice is shown when there is no entry in the stats table:

notice: Undefined variable: stat in feedapi.module on line 1523.

Fix is attached.

mustafau’s picture

Even more:

notice: Undefined property: stdClass::$feed in feedapi.module on line 222.
notice: Undefined variable: between in feedapi.module on line 1367.
aron novak’s picture

Status: Active » Fixed

I fixed all of the above notices.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.