Closed rpiech closed 2 years ago
I created a pacth for this error.
first install this npm i patch-package --save-dev
create a folder named patches
in the root
and put a file named strapi-plugin-placeholder+4.1.7.patch
there with this content:
diff --git a/node_modules/strapi-plugin-placeholder/server/utils.js b/node_modules/strapi-plugin-placeholder/server/utils.js
index afee787..59d836f 100644
--- a/node_modules/strapi-plugin-placeholder/server/utils.js
+++ b/node_modules/strapi-plugin-placeholder/server/utils.js
@@ -8,7 +8,7 @@ const pluginId = require('./plugin-id');
* @returns {boolean} whether a placeholder can be generated for the given MIME type
*/
-const isValidMimeType = (mimeType) => mimeType.startsWith('image/');
+const isValidMimeType = (mimeType) => mimeType && mimeType.startsWith('image/');
/**
* Helper that retrieves one of the available services of this plugin from Strapi.
after this rerun npm i
@Evilazio can you confirm the placeholder is updated properly when you update a media library entry by replacing the image in it?
I also face the same issue here
@Evilazio can you confirm the placeholder is updated properly when you update a media library entry by replacing the image in it?
Yes, the placeholder is updated correctly when replace the image.
Should be fixed in the new 4.3.6 version!
I've stumbled upon an issue when trying to add alternativeText to image, when you try to save it, it will throw 500 error. Uploading works just fine, there's only a problem when you click 'Finish' button in edit of an image. I've already tried your workaround from #2 but it wouldn't work in this case.
@strapi/strapi: "4.2.0"
strapi-plugin-placeholder: "^4.1.7"
How to replicate: