Solved: Uncaught ReferenceError: Base64 is not Defined in Magento 2.3
Ever faced an error in Magento 2.3 that says :
“Uncaught ReferenceError: Base64 is not defined.”
You might have faced this error while uploading images from admin in Magento 2.3.
If you’re looking for the solution of Uncaught ReferenceError: Base64 is not Defined in Magento 2.3 that means, you have solved the error Count(): Parameter must be an array or an Object That Implements Countable in Magento 2.3 and then landed on this error!
Happened the same with me! Hence, I have posted the solution for the same here:
Solution for Uncaught ReferenceError: Base64 is not defined in Magento 2.3
Replace the code of Uploader.php at vendor\magento\framework\File
1 |
if (is_array($file) && count($file) > 0 && count($file[0]) > 0 && count($file[1]) > 0) { |
with the below code
1 |
if (is_array($file) && count($file) > 0 && !empty($file[0]) && (isset($file[1]) && !empty($file[1]))) { |
Solved!
If you find any difficulty while solving this error, do mention in the Comments section below.
I would be happy to help.
Similar solution:
Feel free to share the solution with Magento community via social media.
Thank you.
Jignesh Parmar
An expert in his field, Jignesh is the team leader at Meetanshi and a certified Magento developer. His passion for Magento has inspired others in the team too. Apart from work, he is a cricket lover.
Prev
Solved: Failed to Set ini Option “session.cookie_samesite” to Value “Lax” in Magento 2.3.6-p1
Opacity vs RGBA: Which One is Better in CSS?
Next