Recommended Posts

20 minutes ago, kongondo said:

That's strange. Point #3 contradicts point #1. Media is only uploaded to that sub-folder if in the setting After Uploading you have selected option 3 (i.e., to keep media in a temporary folder until they have been reviewed). If you have option 1 or 2, the media is uploaded directly to the Media Library. Please confirm the option you have selected in this setting, just in case you are looking at a different setting from the one I am referring to, thanks.

Edit: Please also confirm that you have the latest version (005) Jquery File Upload

Files are uploaded to ..site/assets/MediaManager/jqfu/.files_no_show
Thumbnails are generated in ..site/assets/MediaManager/jqfu/.files_no_showthumbnails
This folder is empty: ..site/assets/MediaManager/uploads

Settings
After Uploading: Add uploads ... not publish (= option 2)

jQueryFileUpload: 0.0.5

Share this post


Link to post
Share on other sites
27 minutes ago, Metaphora said:

Files are uploaded to ..site/assets/MediaManager/jqfu/.files_no_show
Thumbnails are generated in ..site/assets/MediaManager/jqfu/.files_no_showthumbnails
This folder is empty: ..site/assets/MediaManager/uploads

Settings
After Uploading: Add uploads ... not publish (= option 2)

With these settings, the files should only be temporarily uploaded to /site/assets/MediaManager/jqfu/.files_no_show. They are then deleted once they have been copied to the Media Manager Library. The thumbnails also get deleted in that process.  However, if you upload very large images (dimensions or size), the process may time out. In that case you will get the error you are getting (Empty file upload result) . That means the server did not send back a success message in response to the ajax request sent by Jquery File Upload. If you check your browser dev tools as per the image below (under either Preview or Response tab), you should see a similar error. Is this the case for you?

 

media-manager-not-enough-memory-to-load-error.thumb.png.badbaa5e98369ff583defefa9ffe92ec.png

Edited by kongondo
correction

Share this post


Link to post
Share on other sites

"Solved" the problem.

1. Deleted all files in site/assets/MediaManager/jqfu/.files_no_show and thumbnails.

2. Upload a single image.

3. Image is successfully added.

4. Publish image.

5. No image in ..site/assets/MediaManager/jqfu/.files_no_show

As I said, everything was working fine until I tried to upload about 40 files at the same time.
This upload failed after 20 images or so (Empty file upload result).
After this I couldn't upload any file.

So I guess, the problem is caused by the files left behind in jqfu/.files_no_show.

 

Share this post


Link to post
Share on other sites
37 minutes ago, Metaphora said:

"Solved" the problem.

Glad you got it sorted. However, I feel there's still something funky going on. You should still be able to do bulk uploads. OK, maybe not 40 at a time, but 20 or so images. There's also a 'Scan' function if that suits you better.

Share this post


Link to post
Share on other sites

But let's say, an upload fails because of a memory issues ... shouldn't the  files in ..site/assets/MediaManager/jqfu/.files_no_show be automatically deleted?

Share this post


Link to post
Share on other sites
3 hours ago, Metaphora said:

But let's say, an upload fails because of a memory issues ... shouldn't the  files in ..site/assets/MediaManager/jqfu/.files_no_show be automatically deleted?

In that case, technically, the upload has not failed. Files have been uploaded to the temporary folder/../jqfu/.files_no_show. In there, a number of validation checks take place to ensure what is uploaded is valid. Some checks are done by (1) JQFU, others by  (2) ProcessWire's WireUpload and finally by (3) Media Manager. If a file passes validation, it is copied over to the library. Media Manager is responsible for deleting copies of uploaded media in the temporary folder. Since the process times out before reaching step #3, the uploaded media remain in the temporary folder, do not make it to the library, hence MM does not delete the uploaded originals in the temporary folder.

Share this post


Link to post
Share on other sites

Hi,

I've bought Media Manager before a few days and have a question: how can I add files to the media library via the api and how can I add media manager assets to a media manager field via the api? I'm importing a large Wordpress page and have to add a lot of files... 

Thank you, regards

Sebastian

Share this post


Link to post
Share on other sites

Hi @SebastianP,

Thanks for your purchase.

18 hours ago, SebastianP said:

how can I add files to the media library via the api and how can I add media manager assets to a media manager field via the api? I'm importing a large Wordpress page and have to add a lot of files... 

There is no external API to do this. You can have a look at the file MediaManagerActions.php  to see how we do it internally, specifically the methods actionInsert() (adding media to a Media Manager field on a page) and actionCreateMedia() (for creating media from uploaded files).  What is your import process? Do you have all the files available in some directory? Are you not able to import them using Media Manager upload feature?

Share this post


Link to post
Share on other sites

Thanks for your answer! Meanwhile I've imported the files manually ("new Page()... ") - the hint to the "actionInsert()"-method helps me with the rest:-) 

Are you not able to import them using Media Manager upload feature?

No - I want to rebuilt the existing wordpress posts (text, text with image, galleries and so on) with repeater items; so I must tag the files during the import with their ID from the wp_posts table. 

Share this post


Link to post
Share on other sites
2 hours ago, SebastianP said:

Meanwhile I've imported the files manually

Glad you got it sorted :).

Share this post


Link to post
Share on other sites

Hi @kongondo,

I've been getting to know this module and it's really impressive the features you've worked in and all the settings that can be customised.

Just wondering about the behaviour of the MM inputfield though - currently it reloads the whole of Page Edit with each addition to the field, which is not so good if the user has made some edits to other fields but not yet saved the page. They are faced with the option of accepting the reload which would lose the other field edits, or cancelling the reload in which case their media selection is not added.

Maybe you could look at how the PageTable inputfield reloads itself via AJAX when a change is made, and do something similar with the MM inputfield?

  • Like 2

Share this post


Link to post
Share on other sites

Media Manager version 011  (released 20/07/2017)

Happy to announce the latest release of Media Manager.

Changelog

  1. Fixed bug that caused required Media Manager fields to still be labelled as 'missing required value' even when they were populated.

Share this post


Link to post
Share on other sites

Hi @kongondo, I'm running into an issue with the module not displaying properly (screenshot attached).

Also, how can I redownload the module? I'm thinking maybe the module folder is corrupted?

Thanks!

5975ccf2e749a_ScreenShot2017-07-24at12_30_31.thumb.png.5a0182dc5f249593d659eef66e33fe4c.png

Share this post


Link to post
Share on other sites

Hi @onjegolders,

Thanks for your purchase.

Apologies about the issues you are having with the module.

8 hours ago, onjegolders said:

I'm thinking maybe the module folder is corrupted?

Probably. Please try and re-install. Check for any missing files using the Network Tab. The error you see in the console is a pesky one that I've never been able to decipher/get to the root of. For now, we live with it; it doesn't affect anything.

8 hours ago, onjegolders said:

how can I redownload the module?

Please check your email.

Thanks.

Share this post


Link to post
Share on other sites

Hi!

I am having trouble with images not being shown to other users that dont have  superuser role. All images were uploaded by superuser with id 41. 

I added media-manager permissions to the role in question, and then the role to the user, is this enough? Also the options of media manager are configured to show all user images. 

Share this post


Link to post
Share on other sites
31 minutes ago, elabx said:

is this enough?

Hi @elabx. No, it is not. You also need to set up permissions at the template level. This is described here.

Let me know if this helps.

Share this post


Link to post
Share on other sites
3 hours ago, kongondo said:

Hi @elabx. No, it is not. You also need to set up permissions at the template level. This is described here.

Let me know if this helps.

Oh thanks! Another brilliant example of RTFM.

Share this post


Link to post
Share on other sites

I am looking for a clean way to remove the "Media Manager" pages from the top search in the admin for a certain user role. When searching, these pages are being returned and confusing the user that they can edit them instead of using the Media Manager tool. Attached is an image to help describe what I mean. Make note of the page types "Media Manager: ect"

I was thinking a hook using ProcessPageSearch?

Any thoughts or suggestions are appreciated.

 

example

Share this post


Link to post
Share on other sites

This post has a perfect solution if anyone else need it. I will be glad to share my code if needed.

  • Like 2

Share this post


Link to post
Share on other sites
On 18/08/2017 at 8:28 PM, RyanJ said:

This post has a perfect solution if anyone else need it. I will be glad to share my code if needed.

Glad you found a solution. Thanks for helping others.

Share this post


Link to post
Share on other sites

Renewals and Resend Links

Hi,

Renewal and resend links pages for Media Manager have been added. Use renewals if you wish to renew a Media Manager order whose subscription has expired (1 year). Resend are for orders that are yet to expire. Use this if you can't find or didn't get the confirmation email sent after your purchase.

  • Like 1

Share this post


Link to post
Share on other sites

Hello,

I have a question about supported file formats -

I have added 'svg' to valid image file extensions, and this works when using the 'Scan' method to upload files. When I try the JqueryFileUploader, I get an error saying ' Filetype not allowed'

 

Is there any other configuration I need to change to allow svg files to be uploaded as images?

 

Thanks!

Share this post


Link to post
Share on other sites
22 hours ago, Tom H said:

Is there any other configuration I need to change to allow svg files to be uploaded as images?

Thanks for reporting @Tom H. Looking into it.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Sebi
      I've created a small module which lets you define a timestamp after which a page should be accessible. In addition you can define a timestamp when the release should end and the page should not be accessable any more.
      Github: https://github.com/Sebiworld/PageAccessReleasetime
      Usage
      PageAccessReleasetime can be installed like every other module in ProcessWire. Check the following guide for detailed information: How-To Install or Uninstall Modules
      After that, you will find checkboxes for activating the releasetime-fields at the settings-tab of each page. You don't need to add the fields to your templates manually.
      Check e.g. the checkbox "Activate Releasetime from?" and fill in a date in the future. The page will not be accessable for your users until the given date is reached.
      If you have $config->pagefileSecure = true, the module will protect files of unreleased pages as well.
      How it works
      This module hooks into Page::viewable to prevent users to access unreleased pages:
      public function hookPageViewable($event) { $page = $event->object; $viewable = $event->return; if($viewable){ // If the page would be viewable, additionally check Releasetime and User-Permission $viewable = $this->canUserSee($page); } $event->return = $viewable; } To prevent access to the files of unreleased pages, we hook into Page::isPublic and ProcessPageView::sendFile.
      public function hookPageIsPublic($e) { $page = $e->object; if($e->return && $this->isReleaseTimeSet($page)) { $e->return = false; } } The site/assets/files/ directory of pages, which isPublic() returns false, will get a '-' as prefix. This indicates ProcessWire (with activated $config->pagefileSecure) to check the file's permissions via PHP before delivering it to the client.
      The check wether a not-public file should be accessable happens in ProcessPageView::sendFile. We throw an 404 Exception if the current user must not see the file.
      public function hookProcessPageViewSendFile($e) { $page = $e->arguments[0]; if(!$this->canUserSee($page)) { throw new Wire404Exception('File not found'); } } Additionally we hook into ProcessPageEdit::buildForm to add the PageAccessReleasetime fields to each page and move them to the settings tab.
      Limitations
      In the current version, releasetime-protected pages will appear in wire('pages')->find() queries. If you want to display a list of pages, where pages could be releasetime-protected, you should double-check with $page->viewable() wether the page can be accessed. $page->viewable() returns false, if the page is not released yet.
      If you have an idea how unreleased pages can be filtered out of ProcessWire selector queries, feel free to write an issue, comment or make a pull request!
    • By David Karich
      Thanks to the great Pro module "RepeaterMatrix" I have the possibility to create complex repeater items. With it I have created a quite powerful page builder. Many different content modules, with many more possible design options. The RepeaterMatrix module supports the cloning of items, but only within the same page. Now I often have the case that very design-intensive pages and items are created. If you want to use this module on a different page (e.g. in the same design), you have to rebuild each item manually every time.
      With this proof of concept I have created a module which adds the feature to copy a repeater item to the clipboard so that you can paste this item to another page with the same repeater field. The module has been developed very rudimentarily so far. It is currently not possible to copy nested items. There is also no check of Min/Max. You can also only copy items that have the same field on different pages. And surely you can solve all this more elegantly with AJAX. But personally I lack the deeper understanding of the repeaters. Also missing on the Javascript side are event triggers for the repeaters, which would make it easier. Like e.g. RepeaterItemInitReady or similar.
      it would be great if @ryan would implement this functionality in the core of RepeaterMatrix. I think he has better ways to implement this. Or what do you think, Ryan?
      Everybody is welcome to work on this module and improve it, if it should not be integrated into the matrix core. Therefore I put it for testing and as download on GitHub: https://github.com/FlipZoomMedia/InputfieldRepeaterMatrixDublicate
      You can best see the functionality in the screencast: 
       
    • By anderson
      Hi,
      Please take a look at this:
      https://templatemag.com/demo/Good/
      The upper nav bar, including dropdowns like "pages" and "portfolios", what do you call this whole thing? At first I guess it's called "dropdown nav bar", but seems not.
      AND of course, what's the simplest way/module to achieve this in PW?
      Thanks in advance.
    • By Sebi2020
      Hey, I'm new and I created a simple module for tagging pages because I didn't found a module for it (sadly this is not a core feature). This module is licensed under the GPL3 and cames with absolutly no warranty at all. You should test the module before using it in production environments. Currently it's an alpha release. if you like the module or have ideas for improvements feel free to post a comment. Currently this fieldtype is only compatible with the Inputfield I've created to because I haven't found  an Inputfield yet, that returns arrays from a single html input.
      Greetings Sebi2020
      FieldtypeTags.zip.asc
      InputfieldTagify.zip
      InputfieldTagify.zip.asc
      FieldtypeTags.zip
    • By psy
      Background
      I'm creating a module to integrate https://pushalert.co/ into ProcessWire. You actually don't even need a module. You could just use the "Other Websites" javascript provided by PushAlert for basic functionality, ie send a broadcast notification to all subscribers. This is essentially what all the other integrations, including WordPress, do. The WP integration installs a widget with a form enabling the admin to enter details such as title, message, etc from a blog post. It does not:
      collect any statistics within the CMS about the notification enable audience fine tuning to eg a particular subscriber or subscriber segment within WP. The admin needs to use the PA dashboard for that functionality PushAlert has a javascript and REST API. It's intended that this module will use both. https://pushalert.co/documentation 
      What my module does so far:
      associate a subscription with a user. FE user clicks a button on the website front end to subscribe and/or agrees to the browser popup to accept notifications from this site send broadcast push alerts from a page within admin It doesn't have a 'widget' but easy enough to create a fieldsetpage with the relevant fields and add that fs page to any appropriate templates, then with a hook, send the notification. Need to be careful that once published/sent, the notification is not automatically re-sent on subsequent page edits.
      Looking for help/collaboration on how best:
      to send a notification, eg from a blog post, then track the statistics. Dilemma is that the push notification must come from the admin page. Responses go to the sending page which, as it's an admin page, is restricted and will not accept the https response. This is where the other CMS integrations stop. The only json response from PushAlert is the status, eg 'success', and the notification id. There is no opportunity at this point to capture the sending page id. handle, 'once sent on page publish', do not automatically resend on future page edits Am thinking along the lines that FS Page will have a @kongondo runtime markup field https://modules.processwire.com/modules/fieldtype-runtime-markup/ to pull the stats from PushAlert. Every time an admin visits the page, the stats will update.
      Once an admin checks the 'Send notification on page publish' checkbox, a hook creates new front end page that records the 'sender page', sends the notification request to PA, which then uses that newly created frontend page, as the response endpoint. Another rook re-associates the front end page with the admin page (eg blog post), to update the stats.
      Potential use cases:
      Notify individual and/or users with a particular role of an event, eg "New work opportunity" for job seekers; new blog post published; entries now open, etc...
      Looking for help/ideas/collaboration on this module. Please let me know if you're interested and as I do, believe this would be a great addition to ProcessWire