- Issue created by @budalokko
- Status changed to Needs review
11 months ago 4:02pm 30 December 2023 - 🇪🇸Spain budalokko Girona
MR patch to test -> https://git.drupalcode.org/project/plupload_widget/-/merge_requests/9.diff
- 🇮🇳India Sandeep_k New Delhi
Hi @budalokko, I tested this on Drupal 10.2, I was able to reproduce the error but while applying the patch I was getting this error-(error attached).
- 🇪🇸Spain budalokko Girona
probably the patch should be applied against current dev version, not latest release
- 🇫🇷France steveoriol Grenoble 🇫🇷
When I try to install the current dev version, it is not works ?? do you know why ?
With:
composer require 'drupal/plupload_widget:2.0.x-dev
I get:Problem 1 - Root composer.json requires drupal/plupload_widget 2.0.x-dev, found drupal/plupload_widget[dev-1.x, 1.0.0, 1.x-dev (alias of dev-1.x), 2.0.0-beta1, 2.0.0-beta2, 2.0.0-beta3, 2.0.0-beta4] but it does not match the constraint. [...]
- 🇪🇸Spain budalokko Girona
Not sure why that could be happening. Maybe the branch name in gitlab is wrong (
2.0.x-dev
??)Checked and other modules do not contain
-dev
in the name. I've created a new branch without the-dev
suffix. It doesn't work but maybe is some cache issue. Will wait one or two days and try again. There's no dev release listed on https://www.drupal.org/project/plupload_widget/releases → , which is probably why composer can't find it.
- 🇪🇸Spain budalokko Girona
I've created it. Then it seems the following allows to install it.
composer clear-cache composer require 'drupal/plupload_widget:2.0.x-dev'
and the patch applies -> https://git.drupalcode.org/project/plupload_widget/-/merge_requests/9.diff
- 🇫🇷France steveoriol Grenoble 🇫🇷
OK, by now we can get the "dev" version; coll ;-)
- Upgrading drupal/plupload_widget (2.0.0-beta4 => dev-2.0.x 2e89be1)
But. the patch still doesn't apply in my case, it surely needs to be refreshed.
- Applying patches for drupal/plupload_widget https://git.drupalcode.org/project/plupload_widget/-/merge_requests/9.patch ([3411433] Can't save node after d10.2 update) Could not apply patch! Skipping. The error was: Cannot apply patch https://git.drupalcode.org/project/plupload_widget/-/merge_requests/9.patch
- 🇪🇸Spain budalokko Girona
Not sure what's the difference, but using the URL for the patch I provided above applies cleanly:
https://git.drupalcode.org/project/plupload_widget/-/merge_requests/9.diff
(.diff instead of .patch)
- 🇫🇷France steveoriol Grenoble 🇫🇷
Yes, the patch is applied using the ".diff" and not the ".patch".
Thanks @budalokko
- 🇫🇷France paulguy Paris
Thanks for the work on this.
The ConstraintValidator needs to be updated also, otherwise the field 'max_filesize' is not used.
I got it working back with this change
// Drupal Core < 10.2.0 if (isset($validators['file_validate_size']) && !empty($max_filesize)) { $validators['file_validate_size'] = [$max_filesize]; } // Drupal Core >= 10.2.0. else if (isset($validators['FileSizeLimit']['fileLimit']) && !empty($max_filesize)) { $validators['FileSizeLimit']['fileLimit'] = $max_filesize; }
- 🇪🇸Spain budalokko Girona
@paulguy Which ConstraintValidator? Is it related to 🐛 Cannot upload large files above PHP.ini limits Active and its patch?
-
budalokko →
committed b83bac72 on 2.0.x
Issue #3411433: Can't save node after d10.2 update
-
budalokko →
committed b83bac72 on 2.0.x
- Status changed to Fixed
8 months ago 4:19pm 16 March 2024 - 🇪🇸Spain budalokko Girona
Merged this one. If there's some issue related to "ConstraintValidator" please re-open or create a new issue.
Automatically closed - issue fixed for 2 weeks with no activity.