sterc / mediamanager Goto Github PK
View Code? Open in Web Editor NEWEnterprise grade media management in MODX
Home Page: https://www.sterc.com/modx/extras/media-manager
Enterprise grade media management in MODX
Home Page: https://www.sterc.com/modx/extras/media-manager
You have to enable the Media Manager per MediaSource. Go to the top-menu "Media" -> "Media Sources" -> "Create property" and set the Textfield value to "1"
What is the name of the property?
https://www.dropbox.com/s/dxv9kzkzdju0r6d/Screenshot%202018-01-14%2018.10.27.png?dl=0
Also, THANK YOU FOR MAKING THIS!!!!!
@gpsietzema have you guys looked into if this is compatible with php 8?
When adding images, the following error occurs:
[2021-06-25 14:08:58] (ERROR @ /var/www/html/public/core/components/mediamanager/processors/mgr/thumbnail.class.php : 5) PHP warning: require_once(/var/www/html/public/core/model/phpthumb/modphpthumb.class.php): failed to open stream: No such file or directory
In MODX3S this folder (phpthumb) does not exist.
To test it out, I copied the folder from another MODX 2.x branch and pasted it in there. Errors disappeared, but the thumbnails still are not generated. I am assuming MODX3 is using phpthumb in a different way.
In the addFile method you can use $options
, for example skip_file_hash_check
option. But you can configure this option, so make this option listen to the system settings.
On the edit form of an image, the source dropdown adds some extra text to the last drop down option.
This is not consistent with the upload image form.
In our usability testing we have determined that the workflow for archiving and replacing images should be optimized.
When a user successfully replaces an image, the edit screen of that image gets shown but no success message is displayed. In the edit screen that gets shown, there still exists the Archive and Replace button (in red), which makes the user think that they still have to do something.
We would suggest that after replacing the image a success message gets shown instead of the edit window.
The URL being generated for the download button is not complete. It contains a URL that is missing proper URL syntax.
The Link URL in this view is properly being rendered however.
Tested on MODX3.0.1 and MediaManager 0.3.1.
To reproduce, just upload an image to the MediaManager and try to download it from the edit screen.
Hi there.
Currently it seems impossible to upload an image file that contains the same image, despite renaming the file itself. This is especially evident with .svg files, where adding a random id inside the code allows upload again.
I would suggest including the filename into the duplication check. For the editor it would be far more understandable that files need to have (at least) unique filenames, but can have the same content. It seems more intuitive, but I might be wrong.
Sorry if that is not the right place for a suggestion, but thank you for your time nonetheless!
On a fresh install of mediamanager 0.2.0-pl BETA from the package installer. Running Mac OS with Firefox Quantum 59.02 (64) Here are the errors I receive:
`
unreachable code after return statement[Learn More]
modx.tree.js:763:16
window.controllers/Controllers is deprecated. Do not use it for UA detection.
ace.min.js:1:18511
TypeError: $.ui is undefined[Learn More]
jquery.nestedSortable.js:35:5
http://www.mydomain.com/assets/components/mediamanager/libs/jquery-nested-sortable/2.0.0/js/jquery.nestedSortable.js:35:5
http://www.mydomain.com/assets/components/mediamanager/libs/jquery-nested-sortable/2.0.0/js/jquery.nestedSortable.js:26:9
http://www.mydomain.com/assets/components/mediamanager/libs/jquery-nested-sortable/2.0.0/js/jquery.nestedSortable.js:13:2
TypeError: $(...).nestedSortable is not a function[Learn More]
mediamanager-categories.js:31:13
sortable
http://www.mydomain.com/assets/components/mediamanager/js/mgr/mediamanager-categories.js:31:13
http://www.mydomain.com/assets/components/mediamanager/js/mgr/mediamanager-categories.js:245:9
k
http://www.mydomain.com/assets/components/imageplus/js/mgr/imageplus.min.js:8:26070
fireWith
http://www.mydomain.com/assets/components/imageplus/js/mgr/imageplus.min.js:8:26892
ready
http://www.mydomain.com/assets/components/imageplus/js/mgr/imageplus.min.js:8:28749
h
http://www.mydomain.com/assets/components/imageplus/js/mgr/imageplus.min.js:7:21312
unreachable code after return statement[Learn More]
modx.tree.js:763:16
`
Right now, when clicking on an image in the mediamanager, it selects/checks it so it can be used for a multi-select action. Would be more user-friendly when clicking just directly opens the preview. For selecting/checking an image for mult-select just show a checkbox top-left, the same as for example Google Photos.
Lexicon texts break at random intervals, apparently actions taken does not matter, so I can't give a good way to reproduce sadly. It also happens in another Modx instance where I use the Media Manager
Modx 2.8.2
PHP 7.3
MM 2.3
After Cache Clearing and browser hard refresh they usually work again
Any hint or idea would be greatly appreciated!
After a fresh error-free install of modx3-rc2, I installed mediamanager [BETA], configured it [as written on their github](https://github.com/Sterc/mediamanager)
, and then am confronted with this error on the media > media manager page:
Your default mediasource (ID 1) is not configured to use with the Media Manager. Please add a property 'mediamanagerSource' with value '1' to this mediasource and all other mediasources you want to use with the Media Manager.
I then triple checked the mediamanagerSource was set to 1 and that I added the property to the admin user and pointed it to the media source I'm using.
Finally, checking the error manager I am seeing the following errors:
[2022-02-24 17:47:42] (ERROR @ /home/******/public_html/core/vendor/xpdo/xpdo/src/xPDO/xPDO.php : 1340) Could not get table class for class: modMediaSource [2022-02-24 17:47:42] (ERROR @ /home/******/public_html/core/vendor/xpdo/xpdo/src/xPDO/xPDO.php : 1309) Could not get table name for class: modMediaSource [2022-02-24 17:47:42] (ERROR @ /home/******/public_html/core/vendor/xpdo/xpdo/src/xPDO/xPDO.php : 786) modMediaSource::getSelectColumns() is not a valid static method. [2022-02-24 17:48:08] (ERROR @ /home/******/public_html/core/vendor/xpdo/xpdo/src/xPDO/xPDO.php : 786) modMediaSource::load() is not a valid static method. [2022-02-24 17:48:16] (ERROR @ /home/******/public_html/core/vendor/xpdo/xpdo/src/xPDO/xPDO.php : 786) modMediaSource::load() is not a valid static method. [2022-02-24 17:56:17] (ERROR @ /home/******/public_html/core/vendor/xpdo/xpdo/src/xPDO/xPDO.php : 786) modMediaSource::load() is not a valid static method.
So I went in phpMyAdmin and found the modx_media_sources to double check the new property was registered properly:
a:4:{s:8:"basePath";a:6:{s:4:"name";s:8:"basePath";s:4:"desc";s:23:"prop_file.basePath_desc";s:4:"type";s:9:"textfield";s:7:"options";a:0:{}s:5:"value";s:1:"/";s:7:"lexicon";s:11:"core:source";}s:7:"baseUrl";a:6:{s:4:"name";s:7:"baseUrl";s:4:"desc";s:22:"prop_file.baseUrl_desc";s:4:"type";s:9:"textfield";s:7:"options";a:0:{}s:5:"value";s:1:"/";s:7:"lexicon";s:11:"core:source";}s:15:"imageExtensions";a:6:{s:4:"name";s:15:"imageExtensions";s:4:"desc";s:30:"prop_file.imageExtensions_desc";s:4:"type";s:9:"textfield";s:7:"options";a:0:{}s:5:"value";s:25:"jpg,jpeg,png,gif,svg,webp";s:7:"lexicon";s:11:"core:source";}s:18:"mediamanagerSource";a:6:{s:4:"name";s:18:"mediamanagerSource";s:4:"desc";s:0:"";s:4:"type";s:9:"textfield";s:7:"options";a:0:{}s:5:"value";s:1:"1";s:7:"lexicon";N;}}
I'm stuck wondering how to address this error. how to move forward. I was very excited to try this addon, as the present mediabrowser does not jive with my clients needs.
Any feedback or request for more information truely appreciated!
Running
Modx3-RC2
PHP 8.1 (maybe the issue?)
Hello
This looks interesting
Is there a way I can use Media Manager to give each user their own media storage (so that they can upload an image into a TV) and not be able to manage other users media?
James
Hello,
i like the idea of the new mediamanager. Is it still in development? I try to add a TV to a resource and set the type as "Image with mediamanager". Inside the TV the new mediamanager open as a popup and i can select a image. Fine. In the field appears the ID and after reload the link gets broken. On the frontend there is online the ID of the image as output.
How to make this work and by the way how to use it with ContentBlocks #4?
Each image has a set of metadata associated with it. How can I access these values from within the MM Content Block Image Field?
I have been observing the database table "mediamanager_files_content" because I have been seeing that the media links are not working as expected.
When I upload an image via Content Block Media Manager Image field and save the resource, it does not update this database table. When I save the resource a 2nd time it does.
[2021-11-09 12:08:47] (WARN @ /var/www/html/cms/core/components/mediamanager/model/mediamanager/classes/files.class.php : 282) PHP notice: Undefined index: categories
[2021-11-09 12:08:47] (WARN @ /var/www/html/cms/core/components/mediamanager/model/mediamanager/classes/files.class.php : 292) PHP notice: Undefined index: tags
The selected images does have a category and a tag.
Could you please see that this dropdown field is a required field? Thanks! @gpsietzema
When testing the required meta fields, the error that gets shown uses the key instead of the label value. This is then confusing for the user.
After archiving an image you have the possibility to delete an image.
When clicking on delete, you get the confirmation modal. You click yes, and..... visually nothing changes..
In Dev Tools you see a fatal error:
<br />
<b>Fatal error</b>: Uncaught TypeError: Argument 1 passed to modProcessor::outputArray() must be of the type array, bool given, called in /var/www/html/cms/core/components/mediamanager/processors/mgr/files.class.php on line 169 and defined in /var/www/html/cms/core/model/modx/modprocessor.class.php:255
Stack trace:
#0 /var/www/html/cms/core/components/mediamanager/processors/mgr/files.class.php(169): modProcessor->outputArray(true)
#1 /var/www/html/cms/core/components/mediamanager/processors/mgr/files.class.php(52): MediaManagerFilesProcessor->delete()
#2 /var/www/html/cms/core/model/modx/modprocessor.class.php(180): MediaManagerFilesProcessor->process()
#3 /var/www/html/cms/core/model/modx/modx.class.php(1788): modProcessor->run()
#4 /var/www/html/cms/core/model/modx/modconnectorresponse.class.php(144): modX->runProcessor('mgr/files', Array, Array)
#5 /var/www/html/cms/core/model/modx/modconnectorrequest.class.php(86): modConnectorResponse->outputContent(Array)
#6 /var/www/html/cms/core/model/modx/modconnectorrequest.class.php( in <b>/var/www/html/cms/core/model/modx/modprocessor.class.php</b> on line <b>255</b><br />
Do you have a way to integrate this with TinyMceWrapper?
We are saving the uploads in an area outside of the webroot. It seems that if you have this setup, image cropping does not work.
In order to get a around this we created a symlink in the public folder that links to the original images, but we would prefer that this requirement gets removed from the cropping tool.
It seems that the baseUrl is being used instead of basePath.
The function setCurrentSource
sets the wrong mediasource ID to the session. For example, the uploads mediasource is 3 (uploads) and the files mediasource is 2 (files) you will get errors.
When you save a file, file based snippet or chunk the setCurrentSource
will set the $_SESSION['mediamanager']['source']
to 2 (because the $_REQUEST['source']
is set). After this you will get an error in the mediasource because it will load mediasource 2 (files) instead of mediasource 3 (uploads).
Ver.0.2.9
Our test user is able to see all mediasources through the mediamanager, even though their usergroup should not be allowed access. The MediaManager dropdown interface shows all possible mediaManager mediasources.
The normal MODX Browser is correctly blocking permission.
The expected behaviour would be that in the MediaManager source dropdown, they would only see those mediasources that they have access to.
We also tried setting the usersetting as described in the readme, but saw no difference.
In my use case I would like to have the datepicker in German. @sdrenth
Just tried your latest version(0.3.0-pl [beta]) in MODX 2.8.4. It's not working. On launching the Media Manager window, it generates these javascript errors:
imageplus.min.js?v=v2.8.9:6 jQuery.Deferred exception: $(...).select2 is not a function TypeError: $(...).select2 is not a function
at Object.setFilters (/assets/components/mediamanager/js/mgr/mediamanager-files.js:501:39)
at Object.init (/assets/components/mediamanager/js/mgr/mediamanager-files.js:143:18)
at HTMLDocument. (/assets/components/mediamanager/js/mgr/mediamanager-files.js:1773:27)
at e (/assets/components/imageplus/js/mgr/imageplus.min.js?v=v2.8.9:6:50180)
at t (/assets/components/imageplus/js/mgr/imageplus.min.js?v=v2.8.9:6:50504) undefined
imageplus.min.js?v=v2.8.9:6 Uncaught TypeError: $(...).select2 is not a function
at Object.setFilters (mediamanager-files.js:501:39)
at Object.init (mediamanager-files.js:143:18)
at HTMLDocument. (mediamanager-files.js:1773:27)
at e (imageplus.min.js?v=v2.8.9:6:50180)
at t (imageplus.min.js?v=v2.8.9:6:50504)
Also, the Media Manager screen comes up in TinyMCE RTE (2.0.7-pl) just fine, but in ContentBlocks using TinyMCE RTE, the Media Manager screen sits behind the image popup dialog:
I also notice that Jquery is loaded in two places in the manager page header, one nearer the top:
<script src="/assets/components/mediamanager/libs/jquery/1.12.1/js/jquery.min.js"></script> <script src="/assets/components/mediamanager/libs/jquery-ui/1.11.4/js/jquery-ui.min.js"></script>and again further down:
<script src="/assets/components/mediamanager/libs/jquery/1.12.1/js/jquery.min.js?v=284pl"></script> <script src="/assets/components/mediamanager/libs/jquery-ui/1.11.4/js/jquery-ui.min.js?v=284pl"></script>Why are these loaded twice?
Selected, but not delete option. Tried right+clicking and the delete button on keyboard.
When creating a subcategory, the visual interface on the categories editing page becomes not usable.
On the image edit views there is also a UI problem. Subcategories do not get listed in any kind of hierarchy and therefore if you have subcategories that have the same name, you will not be able to decide which subcategory to choose. It's parent is not visually shown.
MODX v3.0.1, MediaManager v0.3.1
What would the email look like, if we have multiple mediasources with image sources that become invalid? Does the email display which media source is referenced?
I could imagine multiple blocks of information - per Mediasource, whereby the name of the Mediasource is being displayed.
Hi there.
Modx: 2.8.1
Tested on Firefox, Chromium (most current versions).
Basically title. There is no way to scroll down a list of say 20 images, neither in the MediaManager maintab or the Modal that opens with ContentBlocks.
Adding overflow: scroll; to css shows the height of having many images is not recognized.
Could you confirm wether this is a local issue? If you know of any fix that would be greatly appreciated of course :)
Edit: Found the solution just after writing this. Basically one of the modx css styles has overwritten the MM Style to overflow: hidden, therefore no scrolling. Simple workaround for anyone wondering:
In /assets/components/mediamanager/css/mgr/mediamanager.css find modx-body-tag and attach !important
#modx-body-tag { overflow: auto !important; }
@sdrenth How will multiple MODX Context's be displayed in the email.
I could imaging grouping Resources by MODX Context. In our case, we could end up with a list of resources covering hundreds of articles, for multiple Websites. Having it all in one list could be visually overwhelming and not very helpful.
In our testing, we noticed that our emails are not using UTF-8.
If you add the <meta charset="UTF-8">
to the chunk email templates, this fixes that.
Also, how can we use our own chunks for the emails in case we need to use our own content?
Our client would like to have a meta field that is a required field when adding an image. In this case it would be the source of the image.
How could we extend the interface to allow for this feature? My idea would be to have the ability to add a metadata template. This template could be a xml scheme or json or something something where we have the option of adding fields and also being able to have a field be required or not.
@gpsietzema to discuss today
Users that are not setup to see a certain mediasource in the Media Manager still can see the content of that mediasource inside of the MediaManager. They can't edit the files, but they still get the option in the dropdown.
Better would be if they can only access the mediasources that they have ACL permissions to.
You know what I mean?
Does archiving only shift the image to the Archiving category?
What other functionality is affected by archiving? For example... if I archive an image, should it disappear in all instances where it is used in the frontend?
Hi Sterc,
I wanted to try out your media-manager, but after installing I get some errors in the console and uploading (or anything) is not working because of that.
The initial errors:
imageplus.min.js?v=v2.8.0:7 jQuery.Deferred exception: $(...).select2 is not a function TypeError: $(...).select2 is not a function
at Object.setFilters (https://domain.tld/assets/components/mediamanager/js/mgr/mediamanager-files.js:373:39)
at Object.init (https://domain.tld/assets/components/mediamanager/js/mgr/mediamanager-files.js:145:18)
at HTMLDocument.<anonymous> (https://domain.tld/assets/components/mediamanager/js/mgr/mediamanager-files.js:1627:27)
at e (https://domain.tld/assets/components/imageplus/js/mgr/imageplus.min.js?v=v2.8.0:7:49615)
at t (https://domain.tld/assets/components/imageplus/js/mgr/imageplus.min.js?v=v2.8.0:7:49917) undefined
I.Deferred.exceptionHook @ imageplus.min.js?v=v2.8.0:7
imageplus.min.js?v=v2.8.0:7 Uncaught TypeError: $(...).select2 is not a function
at Object.setFilters (mediamanager-files.js:373)
at Object.init (mediamanager-files.js:145)
at HTMLDocument.<anonymous> (mediamanager-files.js:1627)
at e (imageplus.min.js?v=v2.8.0:7)
at t (imageplus.min.js?v=v2.8.0:7)
After clicking on the "Upload" button, I get another one:
mediamanager-files.js:280 Uncaught TypeError: $(...).slideToggle is not a function
at Object.dropzoneOpen (mediamanager-files.js:280)
at HTMLButtonElement.r (imageplus.min.js?v=v2.8.0:7)
at HTMLDocument.dispatch (imageplus.min.js?v=v2.8.0:7)
at HTMLDocument.m.handle (imageplus.min.js?v=v2.8.0:7)
On a fresh install of mediamanager 0.2.0-pl BETA from the package installer. Running Mac OS with Firefox Quantum 59.02 (64) Here are the errors I receive:
TypeError: $.fn.modal is undefined[Learn More]
mediamanager-files.js:1:1
<anonymous>
https://www.mydomain.com/assets/components/mediamanager/js/mgr/mediamanager-files.js:1:1
unreachable code after return statement[Learn More]
modx.tree.js:763:16
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.