BUG: tinymce field can't use media library image CMSB 3.82
1 posts by 1 authors in: Forums > CMS Builder
Last Post: 3 hours ago (RSS)
By kitsguru - 3 hours ago
I was trying to use an image from the media library in the wysiwyg editor. This was previously allowed.
In the cmsb/lib/media_functions.php I discovered these lines of code:
// Validate upload field exists and user has access
$fieldName = request('fieldName');
$uploadFields = Schema::fields($GLOBALS['tableName'], 'upload');
$uploadFieldSchema = $uploadFields[$fieldName] ?? null;
match (true) {
empty($uploadFieldSchema) => die("Invalid upload field: $fieldName"),
!userHasFieldAccess($uploadFieldSchema) => die("No access to field: $fieldName"),
default => null,
};
This issue is that the tinymce field is not type upload but mediumtext.
Jeff Shields
yaadev.com
yaadev.com