You are here:  » Unable to Create Filter for Feed - Undefined index in widget.php

Support Forum



Unable to Create Filter for Feed - Undefined index in widget.php

Submitted by locationstore on Fri, 2009-02-27 18:09 in

I am currently testing the Price Tapestry software on a test server before going live with it on our live server. Everything has been working fine until I got to the Feed Filters.

When attempting to add a filter to a test feed (ex. Filter Type: Name Case, Field: Brand), I get an error on on the next page stating:

Notice: Undefined offset: 0 in [path]\admin\feeds_filters_configure.php on line 29

where [path] is the location of the site on the server hard drive.

It continues with additional errors:

Notice: Undefined index: name in [path]\admin\feeds_filters_configure.php on line 73
Notice: Undefined index: in [path]\admin\feeds_filters_configure.php on line 73
Notice: Undefined index: field in [path]\admin\feeds_filters_configure.php on line 74
Notice: Undefined index: in [path]\feeds_filters_configure.php on line 74
Notice: Undefined index: name in [path]\admin\feeds_filters_configure.php on line 80
Fatal error: Call to undefined function filter_Configure() in [path]\admin\feeds_filters_configure.php on line 81

The URL produced that displays theses errors is:

http://[site]/admin/feeds_filters_configure.php?filename=storefeed.xml&id=0

where [site] is the test server domain.

Thinking that the id=0 might be the cause, I went back to the main filters page (feeds_filters.php) and looked at the source code of the rendered page. Within there, I found the following:

<form method='post'>Filter Type:<br />
<select name='name'><br />
<b>Notice</b>: Undefined index: in <b>[path]\includes\widget.php</b> on line <b>14</b><br />
<option value=''>Select..</option>
<option value='searchReplace' >Search and Replace</option>
<option value='textBefore' >Text Before</option>
<option value='textAfter' >Text After</option>
<option value='nameCase' >Name Case</option>
<option value='dropRecord' >Drop Record</option>
<option value='dropRecordIfNotRegExp' >Drop Record If Not RegExp</option>
<option value='utf8Encode' >UTF8 Encode</option>
<option value='utf8Decode' >UTF8 Decode</option>
<option value='trim' >Trim</option>
</select><br /><br />
Field:<br />
<select name='field'><br />
<b>Notice</b>: Undefined index: in <b>[path]\includes\widget.php</b> on line <b>14</b><br />
<option value=''>Select..</option>
<option value='TITLE' >Product Name (TITLE)</option>
<option value='DESCRIPTION' >Product Description (DESCRIPTION)</option>
<option value='G:IMAGE_LINK' >Image URL (G:IMAGE_LINK)</option>
<option value='LINK' >Buy URL (LINK)</option>
<option value='G:BRAND' >Brand (G:BRAND)</option>
<option value='G:PRICE' >Price (G:PRICE)</option>
</select><br /><br />
<input type='submit' name='submit' value='Add' />
</form>

I can only assume this MIGHT be the cause of the problem. Any suggestions as to what I should look for to resolve this issue?

Test Server Software Specs:
Microsoft Windows 7 Ultimate
Internet Information Services 7.5
PHP 5.2.8
MySQL 5.1.31-community
Helicon ISAPI_Rewrite 3 (to handle mod_rewrites)

Submitted by support on Fri, 2009-02-27 18:22

Hi,

Apologies for the inconvenience.

"unset" notices are because of warning levels being set to maxium. I've corrected the source code in the affected files so that it uses isset() instead of simply testing for the variables. I'll email these to you now...

Cheers,
David.

Submitted by locationstore on Fri, 2009-02-27 18:35

Got the email and put the files to the test!

Good news is that on feeds_filters.php, there's no more error from widgets.php in the source code. Good stuff.

Bad news -- feeds_filters_configure.php is still being troublesome. Here are the errors is spits out this time:

- Notice: Undefined offset: 0 in [path]\admin\feeds_filters_configure.php on line 42
- Notice: Undefined index: name in [path]\admin\feeds_filters_configure.php on line 102
- Notice: Undefined index: in [path]\admin\feeds_filters_configure.php on line 102
- Notice: Undefined index: field in [path]\admin\feeds_filters_configure.php on line 104
- Notice: Undefined index: name in [path]\admin\feeds_filters_configure.php on line 114
- Fatal error: Call to undefined function filter_Configure() in [path]\admin\feeds_filters_configure.php on line 116

Is there is any bit of a shining light here is that the table that is trying to be rendered now shows "Category ()" in the Field column. That's better than before where you could see the table, but nothing was shown in it (just a 2x2 table with gray background colors). It's still a 2x2 table, but it's better than before.

Any other thoughts or ideas that I could try?

(BTW: Great response time! Incredibly awesome!)

Submitted by support on Fri, 2009-02-27 18:44

Hi,

This time, it is indicative of the filter trying to be configured not being in the database. Could you try deleting all filters and then starting over now the the previous warnings have been cleared?

Cheers,
David.

Submitted by esko on Tue, 2009-03-17 14:51

Hi,

I have the same problem with the warning levels being set to maxium so I get the Undefined offset: 0 error. How do I change this?

Regards,
Max

Submitted by support on Tue, 2009-03-17 14:59

Hi Max,

The problem described above occurred because the filters had become out of the sync with the feed format, and was resolved by clearing the filters and adding them back again.

If that's not the case on your site, could you perhaps drop me an email with a link to your site (and any password required for the admin area), let me know which feed / filter you're seeing the error on and i'll take a look for you!

Cheers,
David.

Submitted by esko on Wed, 2009-03-18 15:43

Hi,

Actually my problem refers to the OP's first post, cause my error reads the same:
Notice: Undefined offset: 0 in [path]\admin\feeds_filters_configure.php on line 42 and then continues:

Notice: Undefined index: name in [path]\admin\feeds_filters_configure.php on line 102

Notice: Undefined index: in [path]\admin\feeds_filters_configure.php on line 102

Notice: Undefined index: field in [path]\admin\feeds_filters_configure.php on line 104

Notice: Undefined index: in [path]\admin\feeds_filters_configure.php on line 104

Notice: Undefined index: name in [path]\admin\feeds_filters_configure.php on line 114

Fatal error: Call to undefined function filter_Configure() in [path]\admin\feeds_filters_configure.php on line 116

I'm testing it locally on a server.

Your reply to his first post was:

------------
Hi,

"unset" notices are because of warning levels being set to maxium. I've corrected the source code in the affected files so that it uses isset() instead of simply testing for the variables. I'll email these to you now...

Cheers,
David.

Submitted by support on Thu, 2009-03-19 09:49

Hello Max,

It does indicate a database / filter configuration problem, as I notice that the error refers to an undefined function filter_Configure(), whereas this should be filter_[FILTERTYPE]Configure().

Can you try deleting all filters for this feed and then adding them back - and if the problem persists if you could email me a link to your site (and any password required for the admin area) i'll take a look for you...

Apologies for the inconvenience...

Cheers,
David.