Changing content type machine name breaks index

Created on 7 August 2010, over 14 years ago
Updated 10 April 2023, over 1 year ago

Problem

1. After changing the name of the article content type from "article" to "nyhed", the following error occurs on the following path: #overlay=admin/structure/types/manage/nyhed/fields.
Error: Notice: Undefined index: nyhed in _field_ui_bundle_admin_path() (line 314 of /home/www/xxx/modules/field_ui/field_ui.module).

2. When the affected machine name is saved in the $_SESSION['node_overview_filter'] used at path /admin/content

Proposed solution

This is cache issue. We should change function node_type_form_submit() in modules/node/content_types.inc. We need to add

field_cache_clear();
$_SESSION['node_overview_filter'] = array();

after node_types_rebuild();

🐛 Bug report
Status

Needs work

Version

7.0 ⚰️

Component
Node system 

Last updated about 8 hours ago

No maintainer
Created by

Live updates comments and jobs are added and updated live.
  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇳India saket-001

    there is no issue persist in any updated version of 7.x and for 7.x #19 fixes the issues. RTBC+1

  • Status changed to Needs work over 1 year ago
  • 🇸🇰Slovakia poker10

    This was not committed to D8+, therefore removing the backport tag. If I read that correctly, the issue 2 is only a D7 problem.

    As this is a bug, we should probably add a simple test to demonstrate the problem (and no manual testing will be needed afterwards). Moving to NW.

Production build 0.71.5 2024