e107inc / e107

e107 Bootstrap CMS (Content Management System) v2 with PHP, MySQL, HTML5, jQuery and Twitter Bootstrap. Issue Discussion Room: https://gitter.im/e107inc/e107
https://e107.org
GNU General Public License v3.0
320 stars 213 forks source link

No HTML5 support in Media Manager #4964

Closed seth7609 closed 1 year ago

seth7609 commented 1 year ago

Bug Description

When Trying to upload a new image using the media manager I am seeing "No HTML5 support". In the console I am getting 2 jQuery errors

Uncaught TypeError: a.indexOf is not a function in file: jquery-3.1.1.min.js:4:19062

and

Uncaught TypeError: $(...).find(...).once is not a function in file: mediaManager.js:17:42

I thought this was only a problem on the public side of the site but it is also a problem in the admin side as well so if I go to Pages/Menus (e107_admin/cpage.php?mode=page&action=create) it happens there too. It is also a problem in the admin area for the media manager(e107_admin/image.php?mode=main&action=import).

I was having this problem on v2.3.0 and I was hoping that upgrading to 2.3.2 would fix this but it did not.

How to Reproduce

  1. with TinyMce4 enabled create a form with a WYSIWYG using this code e107::getForm()->bbarea("desc", $desc, null, null, "small")
  2. Click the "Insert Media-Manager Image" button inside the WYSIWYG.
  3. Click Upload a File
  4. Where you would usually see an upload area it just says "No HTML5 support"

    Expected Behavior

    A clear and concise description of what you expected to happen.

Screenshots

media_manager console

e107 Version

e107 v2.3.2

PHP Version

php 7.1.33

Jimmi08 commented 1 year ago

Little question... are you in the admin area in the bootstrap3 theme? Why are you manually creating a form when there is admin UI? Or you are doing frontend form? Your news bbarea is working correctly?

Edit: no issues (except with your code without media-category image left in the import part of media manager - MM - ) That error is visible because of any javascript issue...

if this is your custom stuff, your jquery has some issues as the console says. And as result MM is not working. But I don't think that reason is MM itself. I put your code at the beginning of admin_config.php of _blank plugin and it worked.

seth7609 commented 1 year ago

This was found on a front end form.

Any where that the MM is used I am getting this error. Both on the front using the code provided or in the admin area.

Jimmi08 commented 1 year ago

that error is in HTML markup by default (everywhere), it is not error message, it is hidden by javascript normally, but it is not fired from some reason. Your site has to have javascript error - standard e107 is working correctly. Maybe some plugin or something. that mediamanager.js issue in console is there because jquery wasn't loaded correctly (line above). Check if your jquery is loaded in header or footer,,, try to use jquery 2 instead 3...
Try to add
define('e_DEBUG_JQUERY', 2); to e107_config to load older jquery

seth7609 commented 1 year ago

I found the issue. We had called for a different jquery to be loaded in. Thanks for the help!