Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
26a6752f
Commit
26a6752f
authored
13 years ago
by
Angie Byron
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#1079966
by dereine, catch: Fixed Notice when renaming bundles.
parent
13b576f6
No related branches found
No related tags found
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/field_ui/field_ui.module
+11
-0
11 additions, 0 deletions
modules/field_ui/field_ui.module
modules/field_ui/field_ui.test
+15
-0
15 additions, 0 deletions
modules/field_ui/field_ui.test
with
26 additions
and
0 deletions
modules/field_ui/field_ui.module
+
11
−
0
View file @
26a6752f
...
...
@@ -47,6 +47,17 @@ function field_ui_help($path, $arg) {
}
}
/**
* Implements hook_field_attach_rename_bundle().
*/
function
field_ui_field_attach_rename_bundle
(
$entity_type
,
$bundle_old
,
$bundle_new
)
{
// The Field UI relies on entity_get_info() to build menu items for entity
// field administration pages. Clear the entity info cache and ensure that
// the menu is rebuilt.
entity_info_cache_clear
();
menu_rebuild
();
}
/**
* Implements hook_menu().
*/
...
...
This diff is collapsed.
Click to expand it.
modules/field_ui/field_ui.test
+
15
−
0
View file @
26a6752f
...
...
@@ -411,6 +411,21 @@ class FieldUIManageFieldsTestCase extends FieldUITestCase {
$this
->
drupalGet
(
$bundle_path
);
$this
->
assertFalse
(
$this
->
xpath
(
'//select[@id="edit-add-existing-field-field-name"]//option[@value=:field_name]'
,
array
(
':field_name'
=>
$field_name
)),
t
(
"The 'add existing field' select respects field types 'no_ui' property."
));
}
/**
* Tests renaming a bundle.
*/
function
testRenameBundle
()
{
$type2
=
strtolower
(
$this
->
randomName
(
8
))
.
'_'
.
'test'
;
$hyphen_type2
=
str_replace
(
'_'
,
'-'
,
$type2
);
$options
=
array
(
'type'
=>
$type2
,
);
$this
->
drupalPost
(
'admin/structure/types/manage/'
.
$this
->
hyphen_type
,
$options
,
t
(
'Save content type'
));
$this
->
drupalGet
(
'admin/structure/types/manage/'
.
$hyphen_type2
.
'/fields'
);
}
}
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment