Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
uw_cfg_common
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
WCMS
uw_cfg_common
Commits
cd4831aa
Commit
cd4831aa
authored
2 years ago
by
Kevin Paxman
Browse files
Options
Downloads
Patches
Plain Diff
ISTWCMS-5866: improve error message text and show originally entered path
parent
bc1f9273
No related branches found
No related tags found
3 merge requests
!286
ISTWCMS-5866 Prevent URL aliases being created for reserved paths
,
!274
Draft: ISTWCMS-5551: fixing office hours display
,
!260
Feature/istwcms 5668 a5kulkar rename references to publications
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
uw_cfg_common.module
+2
-1
2 additions, 1 deletion
uw_cfg_common.module
with
2 additions
and
1 deletion
uw_cfg_common.module
+
2
−
1
View file @
cd4831aa
...
@@ -958,6 +958,7 @@ function _uw_cfg_common_alias_validate(array &$form, FormStateInterface $form_st
...
@@ -958,6 +958,7 @@ function _uw_cfg_common_alias_validate(array &$form, FormStateInterface $form_st
// Get the alias from the form state values.
// Get the alias from the form state values.
$alias
=
$values
[
'path'
][
0
][
'alias'
];
$alias
=
$values
[
'path'
][
0
][
'alias'
];
$orig_alias
=
$alias
;
// Trim any surrounding slashes from the alias to
// Trim any surrounding slashes from the alias to
// ensure that we are getting exact matches for the
// ensure that we are getting exact matches for the
...
@@ -981,7 +982,7 @@ function _uw_cfg_common_alias_validate(array &$form, FormStateInterface $form_st
...
@@ -981,7 +982,7 @@ function _uw_cfg_common_alias_validate(array &$form, FormStateInterface $form_st
)
{
)
{
// Set an error message if alias exists.
// Set an error message if alias exists.
$form_state
->
setError
(
$form
[
'path'
][
'widget'
][
0
][
'alias'
],
t
(
'
@url
cannot be
an alias
.'
,
[
'@url'
=>
$alias
]));
$form_state
->
setError
(
$form
[
'path'
][
'widget'
][
0
][
'alias'
],
t
(
'
The alias "@url" is a reserved path that
cannot be
used
.'
,
[
'@url'
=>
$
orig_
alias
]));
}
}
}
}
...
...
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