Problem/Motivation
Error encountered:
Error: Call to undefined method Drupal\Component\Utility\Bytes::toInt() in Drupal\video\Plugin\Field\FieldWidget\VideoUploadWidget->getUploadValidators() (line 253 of modules\contrib\video\src\Plugin\Field\FieldWidget\VideoUploadWidget.php).
Steps to reproduce
Chose Video upload instead embed video on Manage Form Display
Add a node (a content), then the following error is encountered:
Error: Call to undefined method Drupal\Component\Utility\Bytes::toInt() in Drupal\video\Plugin\Field\FieldWidget\VideoUploadWidget->getUploadValidators() (line 253 of modules\contrib\video\src\Plugin\Field\FieldWidget\VideoUploadWidget.php).
Comment | File | Size | Author |
---|---|---|---|
#14 | 3353255-fix-undefined-error-14.diff | 1.7 KB | codebymikey |
Issue fork video-3353255
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
Moudeen CreditAttribution: Moudeen commentedCan you create a patch for this?
replace Bytes::toInt() with Bytes::toNumber() or update the module
Thank you
Comment #7
AnybodyConfirming #2 is the correct solution, we had a similar issue in one of our modules.
RTBC for MR!17
Comment #9
a_mitch CreditAttribution: a_mitch commentedUpdated MR 17. There were a couple other instances of toInt() in VideoUploadWidget
Comment #10
keshavv CreditAttribution: keshavv as a volunteer and at gai Technologies Pvt Ltd for gai Technologies Pvt Ltd commentedReviewed and tested MR 17, Its working perfect. Ready to merge.
Comment #11
AnybodyThanks @a_mitch! I indeed didn't check that, just reviewed what was done. Perfect! RTBC+1
Comment #12
_renify_ CreditAttribution: _renify_ as a volunteer commentedThis also fix when saving node page https://www.drupal.org/node/3201242
Comment #13
lisotton CreditAttribution: lisotton at European Commission and European Union Institutions, Agencies and Bodies commentedI also tested MR 17 and it is working fine.
@_renify with your patch, you are fixing things that is not related to this issue and is fixed in #3348748.
Comment #14
codebymikey CreditAttribution: codebymikey at Zodiac Media commentedAddressing feedback from #13, removing the
accessCheck(FALSE)
call.Comment #15
AnybodyLet's simply use the MR, thanks. Any maintainer?
Comment #16
vmarchukTested MR #17 and it is working fine. RTBC+1
Comment #17
mmenavas CreditAttribution: mmenavas as a volunteer commentedTested patch #14 and it is working fine. RTBC+1
Comment #18
kristian.raychev CreditAttribution: kristian.raychev at FFW commentedI also tested MR #17 and it works fine. RTBC+1
Comment #19
drupalfan2 CreditAttribution: drupalfan2 as a volunteer commented+1
Comment #22
podaroktnx
Comment #24
_renify_ CreditAttribution: _renify_ as a volunteer commented