Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
commerce_invoice
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
commerce_invoice
Merge requests
!17
Issue
#3517662
: Fix the broken invoice link within the user invoices view.
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Issue
#3517662
: Fix the broken invoice link within the user invoices view.
issue/commerce_invoice-3517662:3517662-invoices-not-found
into
8.x-2.x
Overview
0
Commits
1
Pipelines
2
Changes
1
Merged
Jonathan Sacksick
requested to merge
issue/commerce_invoice-3517662:3517662-invoices-not-found
into
8.x-2.x
1 month ago
Overview
0
Commits
1
Pipelines
2
Changes
1
Expand
Closes
#3517662
0
0
Merge request reports
Compare
8.x-2.x
version 1
d6609d2a
1 month ago
8.x-2.x (base)
and
latest version
latest version
d6609d2a
1 commit,
1 month ago
version 1
d6609d2a
1 commit,
1 month ago
1 file
+
19
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
commerce_invoice.post_update.php
+
19
−
0
Options
@@ -109,3 +109,22 @@ function commerce_invoice_post_update_5() {
return
$message
;
}
/**
* Update the customer invoices view to fix the default url rewrite pattern.
*/
function
commerce_invoice_post_update_6
()
{
$config_factory
=
\Drupal
::
configFactory
();
$view
=
$config_factory
->
getEditable
(
'views.view.commerce_user_invoices'
);
if
(
$view
->
get
(
'display.default.display_options.fields.invoice_number.alter.path'
)
===
'user/{{ raw_arguments.uid }}/invoices/{{ invoice_id }}'
)
{
return
"The view is already up-to-date."
;
}
if
(
$view
->
get
(
'display.default.display_options.fields.invoice_number.alter.path'
)
===
'user/{{ arguments.uid }}/invoices/{{ invoice_id }}'
)
{
$view
->
set
(
'display.default.display_options.fields.invoice_number.alter.path'
,
'user/{{ raw_arguments.uid }}/invoices/{{ invoice_id }}'
);
$view
->
save
(
TRUE
);
return
"The views.view.commerce_user_invoices view was updated"
;
}
return
"The views.view.commerce_user_invoices couldn't be updated as the default path for the title field has been overridden with custom value. Test if rewrite pattern is correct."
;
}
Loading