When you go to admin/content/node and filter on a specific content type e.g. video and then you delete the video content type you will get an error when visiting content overview again:

Notice: Undefined index: video in node_filter_form() (line 159 of /var/www/web92/html/drupal-7.12/modules/node/node.admin.inc).

Comments

swentel’s picture

Status: Active » Needs review
StatusFileSize
new3.08 KB
new2.06 KB

yeah, this one is old :)

2 patches. First patch should trigger 1 fail and 1 notice. Second patch should solve the problem and clear the invalid filter in the session.

dotman’s picture

Version: 8.x-dev » 7.x-dev

I just started to have the same issue, only with Drupal 7.12. the sequence was:

1. I had a content type called Events used for Full Calendar
2. I created a new content type called Calendar Events using Date Tools
3. Hooked that to my view in place of the old content type
4. deleted all the content from the old content type "Events"
5 then deleted the content type Events.

Now when I go to list content, nothing is listed and i get the error:

Notice: Undefined index: events in node_filter_form() (line 159 of /Applications/MAMP/htdocs/mirc/modules/node/node.admin.inc).

The site still runs and I am able to add content, but cannot filter at all. would the above patch work for drupal 7.12 as well? Any ideas what casued this?

thanks.

swentel’s picture

Version: 7.x-dev » 8.x-dev

Please keep this on 8.x where it needs to be fixed first. If the patch applies to 7.x it will also remove the notice, but let's wait first what other people think of the patch.

videographics’s picture

I'm just confirming that I did see this message after deleting a content type on 7.14. But, in my situation, the filters seems to be working again and the message is gone.

swentel’s picture

Title: Notice: Undefined index: video in node_filter_form() » Removing node type leaves stale data in $_SESSION['node_overview_filter']
Assigned: Unassigned » swentel
Status: Needs review » Needs work
Issue tags: +Needs backport to D7

Changing title, will re-roll in a minute.

swentel’s picture

Status: Needs work » Needs review
StatusFileSize
new3.08 KB
new2.06 KB

Status: Needs review » Needs work

The last submitted patch, 1498936-6.patch, failed testing.

swentel’s picture

Status: Needs work » Needs review
StatusFileSize
new3.22 KB
new2.21 KB

Good to see you can't delete content types anymore when there are nodes :)

swentel’s picture

Version: 8.x-dev » 7.x-dev
Issue tags: -Needs backport to D7

This is not valid anymore in D8

mgifford’s picture

Assigned: swentel » Unassigned
Issue summary: View changes
Status: Needs review » Needs work

Patch no longer applies. They are all for D8 so would need to be rolled for D7.

dcam’s picture

Status: Needs work » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.