NicklasMF β created an issue.
NicklasMF β created an issue.
NicklasMF β created an issue.
NicklasMF β created an issue.
NicklasMF β created an issue.
NicklasMF β created an issue.
NicklasMF β created an issue.
NicklasMF β created an issue.
Depending on how specific we want to alter the response, if this gets approved: https://www.drupal.org/project/media_entity_download/issues/3418334 β¨ Use filename in download RTBC .
We could also simply create a hook for the filename like:
$filename = $this->moduleHandler()->invokeAll('file_download_name', [$media, file]);
And then add a default return for the hook like: $filename = $file->label();
Or simply add a fallback:
if (empty($content_disposition = $headers['Content-Disposition'] ?? [])) {
I like the idea but I get the following:
Warning: Undefined array key "Content-Disposition" in Drupal\media_entity_download\Controller\DownloadController->download() (line 154 of modules/contrib/media_entity_download/src/Controller/DownloadController.php).
Drupal\media_entity_download\Controller\DownloadController->download(Object)
So maybe it should be turned around:
if (isset($headers['Content-Disposition']) && !empty($content_disposition = $headers['Content-Disposition'])) {
// Key exists and is not empty, so we proceed with the logic.
if (!str_contains($content_disposition, 'filename')) {
$response->setContentDisposition($content_disposition, $filename);
}
} else {
// Key does not exist or is empty, so we set default disposition.
if ($request_query->has(ResponseHeaderBag::DISPOSITION_INLINE)) {
$disposition = ResponseHeaderBag::DISPOSITION_INLINE;
} else {
$disposition = ResponseHeaderBag::DISPOSITION_ATTACHMENT;
}
$response->setContentDisposition($disposition, $filename);
}
I get a similar error on this. Just on the media entity reference field itself when it is required. I can't replace the media by another because of the error Media field is required..
NicklasMF β created an issue.
Although I can see, the proposed solution is not working just like that. This needs further investigation if it is going to work.
NicklasMF β created an issue.
I have an issue where this duplicated hash happens along side using Media Library.
Patch #7 works for me as well.
I also have this problem.
I have custom fields on the user entity which are holding states of the user's progress. And that is not viable to revoke the token as I often need to update the user state.
Proposed solution:
What if we generate a checklist on the OAuth Settings page, mirroring the user's fields. Certain checkboxes would be disabled and set as read-only, while the administrator could select which fields should initiate a revocation.
Additionally, we could consider implementing a hook for conditional revocation of specific fields.
NicklasMF β created an issue.
NicklasMF β created an issue.
I don't get the error message anymore either.
Sorry for not having read the thread.
I am in a situation where I need to implement SAML for the Danish Government (NemLog-in).
The user can login with different accounts (private, employee etc.), and they return with different attributes according to their account, thus no attribute is common except the NameID (that I know of).
I used your patch (2022-01-06/samlauth_nameid.patch) but I end up in a situation where this is longer than the allowed length of the name field.
SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'name' at row 1: INSERT INTO "users_field_data"
with NameID https://data.gov.dk/model/core/eid/professional/uuid/d9a3db11-a100-10d6-9c3e-ac3da2000dba
.
I am thinking about shortening it but just want to let you know and whether we can do something further. Maybe add an event that allows to alter the field further before using it?
NicklasMF β created an issue. See original summary β .
NicklasMF β created an issue.
Thanks. We have reached out to the maintainer.
We are awaiting either a response or 2 weeks whatever comes first and then takes further action.
We actually just want to use the name Atoms and not continue to do work on the module itself.
We have another module within our company that we have named Atoms which we want to add to the community.
Atoms is already taken but the module is obsolete, last updated in 2015 with no statistics for usage since 2016. So we assumed we take over the name.
Alternatively, we need to rename our module but this also means the name Atoms is locked for further use?
Following #75 works here as well on D10
Do we have an update on this?
Patch #11 works here as well
I've used #23 for 3 weeks without any incidents on production. We had several duplicate orders a day before the path.
#10 works for me alongside the parent issue #2681953#36.
#36 works for me as well.
NicklasMF β created an issue.
I don't know why that didn't work neither.
I tried some things back and forth and finally got it to work. I removed one line in the start and added a new line after the specific file.
From line 76:
diff --git a/modules/field/commerce_stock_field.info.yml b/modules/field/commerce_stock_field.info.yml
index 820088b68788c6e770fdb4432ab963d908f75429..d4994864e6db85472d9eca5fc554b74fde16f97f 100644
--- a/modules/field/commerce_stock_field.info.yml
+++ b/modules/field/commerce_stock_field.info.yml
@@ -8,4 +8,4 @@ dependencies:
- commerce_stock:commerce_stock_local
core: 8.x
-core_version_requirement: ^8 || ^9
+core_version_requirement: ^8 || ^9 || ^10
diff --git a/modules/field/tests/src/Functional/StockLevelFieldTestBase.php b/modules/field/tests/src/Functional/StockLevelFieldTestBase.php
I'll just add the patch in case it is useful.
And then I'll go test the patch now.
Path #7 works on my quick test
Sure. I have following in composer.json:
cweagans/composer-patches: 1.7.3
drupal/commerce: 2.33.0
drupal/commerce_stock: 1.0.0
I then add the following:
"patches": {
"drupal/commerce_stock": {
"#3330022 D10": "https://www.drupal.org/files/issues/2023-01-26/commerce-stock-d10-compat-3330022-8.patch"
}
},
And run composer update drupal/commerce_stock
in console.
I get following error:
Gathering patches for dependencies. This might take a minute.
- Installing drupal/commerce_stock (1.0.0): Extracting archive
- Applying patches for drupal/commerce_stock
https://www.drupal.org/files/issues/2023-01-26/commerce-stock-d10-compat-3330022-8.patch (#D10)
Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/2023-01-26/commerce-stock-d10-compat-3330022-8.patch
And the file commerce_stock_field.info.yml.rejis created:
--- modules/field/commerce_stock_field.info.yml
+++ modules/field/commerce_stock_field.info.yml
@@ -7,4 +7,4 @@ dependencies:
- commerce_stock:commerce_stock
- commerce_stock:commerce_stock_local
core: 8.x
-core_version_requirement: ^8 || ^9
+core_version_requirement: ^8 || ^9 || ^10
The Upgrade Status module is only showing one warning:
Value of core_version_requirement: ^8 || ^9 is not compatible with the next major version of Drupal core. See https://drupal.org/node/3070687..
I'll create a MR for the change.
NicklasMF β made their first commit to this issueβs fork.
'#title' => $this->$prefix_text, ['%terms' => $link],
on line 148 doesn't seem to be correct.
What is status on this as I see fails on the latest build?
This is the default text in the the completion_message
in the checkout flow.
Go to your checkout flow, look for Completion message and edit it at the right.
Sorry, if it was not clear enough in my post. The code in the grey box is the .rej file.
#11 works on my end too
This still seem to be a problem when activating or deactivating promotions.
I'm getting the following .rej error file when trying to apply the patch to Drupal 9.5.3:
--- modules/field/commerce_stock_field.info.yml
+++ modules/field/commerce_stock_field.info.yml
@@ -7,4 +7,4 @@ dependencies:
- commerce_stock:commerce_stock
- commerce_stock:commerce_stock_local
core: 8.x
-core_version_requirement: ^8 || ^9
+core_version_requirement: ^8 || ^9 || ^10
I am running a D10 site but couldn't install the module and the patch at the same time, so I downgraded to D9.5 and then installed commerce_stock. After this, I tried to apply the patch but got the error above.
Can you confirm that the patch still works for you, and if so, can you elaborate on how I can test the patch?
Hi ivanpg94,
I think you overcomplicate things in your patch. You could something like:
public function getSKU(): string {
$item = $this->getOrderItem()->getPurchasedEntity();
return $item ? $item->get('sku')->value : '';
}
This also means that you can get it from your template with {{ invoice_item.getOrderItem.getPurchasedEntity.get('sku').value }}
I got the problem too. My problem was that the private file system path was not configured correctly.