Jump to content

Media Manager Archive


kongondo

Recommended Posts

Hi @RyanJ,

  On 3/12/2021 at 2:54 AM, RyanJ said:

if they are even replacing an image on upload? 

Expand  

No, unless they have access to the settings or set the setting themselves or have been informed about the setting.

  On 3/12/2021 at 2:54 AM, RyanJ said:

which image they are replacing

Expand  

The image they are replacing is one that has an identical name. The image name is is used to create the media title.

Link to comment
Share on other sites

  • 2 months later...

Having a problem displaying images on the front end.

I've just purchased MediaManager and have successfully imported a heap of images. Now I am trying to include a MM image and display it via an existing template.

The steps I have followed thus far:
1. Add a new textarea field to the existing template - named PortfolioImage
2. Edit a page and insert a single image into the PortfolioImage field, by selecting a MM image. The image shows up in the edit page.
3. In the template file I added the following line:
             if($page->PortfolioImage) echo "<img src='{$page->PortfolioImage}' class='mainimageH' alt='$page->headline'>";
4. The output I get for that line is: <img src='&lt;p&gt;&lt;img alt=&quot;&quot; class=&quot;hidpi&quot; src=&quot;/landscapes/site/assets/files/1500/ql033n.jpg&quot; width=&quot;1200&quot; /&gt;&lt;/p&gt;' class='mainimageH' alt='some text'>

If I have <img src='{$page->PortfolioImage->url}' instead Tracey Debugger shows this error message:  

PHP Notice: Trying to get property 'url' of non-object in .../web/landscapes/site/templates/photos.php:10

I am clearly doing something wrong. Can anyone point me in the right direction please?

PW 3.0.165, MM 0.1.2, PHP: 7.3.16

Link to comment
Share on other sites

  On 6/7/2021 at 7:20 AM, Rob(AU) said:

I've just purchased MediaManager and have successfully imported a heap of images.

Expand  

Many thanks for the purchase.

  On 6/7/2021 at 7:20 AM, Rob(AU) said:

If I have <img src='{$page->PortfolioImage->url}' instead Tracey Debugger shows this error message:  

PHP Notice: Trying to get property 'url' of non-object in .../web/landscapes/site/templates/photos.php:10
Expand  

This is because your PortfolioImage is not a file or image field. It is a textarea field. Textarea fields do not have a url property. 

It is not clear to me how you want to display your MM image (i.e. inside a textarea, e.g. CKEditor) or independently of the textarea (i.e., some_media_manager_field->url). I am not sure if you have seen Media Manager's documentation? If not, please have a look at that first. 

Thanks.

Link to comment
Share on other sites

@kongondo now that I have had time to explore a bit more it is making more sense - I had a few family things that interrupted ... male, multi-tasking ... epic fail

I am using PW 3.0.165 and ran into the images not appearing to upload issue, but only on the live site, but that is not causing an issue now.

Is it possible to do something similar to the following using the image media?
echo "<img srcset='{$page->image->srcset('2500x0,/2,/3,/4')}' class='mainimageH' alt='$page->headline'>";

I found a way while writing this. It maybe not elegant, but I'm sharing as it may be helpful in the future.

  Quote

foreach($page->photo as $photo) {
  $imgsrcset = $photo->media->srcset('2500x0,/2,/3,/4');
}
     $out = "";
     $out .=  "<img srcset='$imgsrcset' class='mainimageH' alt='$page->headline'>";
     echo $out;
 

Expand  

 From reading the documentation there are hints about image variations. Is this something designed to provide different images sizes for varying viewport dimensions?

 

Link to comment
Share on other sites

  On 6/10/2021 at 1:50 AM, Rob(AU) said:

I found a way while writing this. It maybe not elegant, but I'm sharing as it may be helpful in the future.

Expand  

Glad you got it sorted :-).

  On 6/10/2021 at 1:50 AM, Rob(AU) said:

$imgsrcset = $photo->media->srcset('2500x0,/2,/3,/4');

Expand  

I have never used srcset myself (I think it is a third-party module?) but this should work since media is a Pageimage object in this case.

  On 6/10/2021 at 1:50 AM, Rob(AU) said:

From reading the documentation there are hints about image variations. Is this something designed to provide different images sizes for varying viewport dimensions?

Expand  

This is used in the ProcessWire sense of image variations as briefly explained here. Whilst you can certainly utilise variations for responsive designs, they are not limited to that use.

  • Like 1
Link to comment
Share on other sites

  • 4 months later...

@kongondowe bought media manager a couple of days ago and are happy so far. but i have one very severe bug and a feature request ?

bug: i cant switch pages. when i click on the arrow or page number 2 on the items list i get this error:
{"error":false,"message":"Unknown Lister action"}

so navigation is not possible. pw is latest dev 3.0.187 -> this is obviously a severe bug

feature: 

it would be great if we could save bookmarks for the filter, like the standard lister can. our customer will need to do similar searches over and over and it would be nice if they could store the important ones

Link to comment
Share on other sites

  On 10/28/2021 at 8:43 AM, csaggo.com said:

we bought media manager a couple of days ago and are happy so far

Expand  

Hi @csaggo.com,

Many thanks for the purchase.

  On 10/28/2021 at 8:43 AM, csaggo.com said:

but i have one very severe bug

Expand  

Not a great start for MM! ?.

  On 10/28/2021 at 8:43 AM, csaggo.com said:

bug: i cant switch pages. when i click on the arrow or page number 2 on the items list i get this error:
{"error":false,"message":"Unknown Lister action"}

Expand  

I'll have a look but very much likely something to do with your environment or the install went bonkers. This hasn't been reported recently. I'll test and get back to you. Before, that, please give me more information about your environment, i.e. 3rd-party modules and multilingual or not thanks.

  On 10/28/2021 at 8:43 AM, csaggo.com said:

it would be great if we could save bookmarks for the filter, like the standard lister can.

Expand  

Currently this is not available as you've noted. However, you can save filter profiles. Please see the docs here, in case you missed it.

Thanks.

Link to comment
Share on other sites

  On 10/28/2021 at 10:11 AM, kongondo said:

I'll have a look but very much likely something to do with your environment or the install went bonkers. This hasn't been reported recently. I'll test and get back to you. Before, that, please give me more information about your environment, i.e. 3rd-party modules and multilingual or not thanks.

Expand  

thanks @kongondofor getting back so quickly. pw is 3.0.187 as mentioned, we use multilanguage indeed. we also use multisite (so basically we change the root-homepage with https://github.com/somatonic/Multisite/ based on domain-name) but my guess is, that its not relevant for backend.

but you are right, the standard page-lister from the pages menü cant switch to page 2 either, so its a pw or setup issue... i will try to figure it out with ryan.

also thank you for the doc-link i indeed missed that. perfekt ?

  • Like 1
Link to comment
Share on other sites

  On 10/28/2021 at 10:27 AM, csaggo.com said:

but you are right, the standard page-lister from the pages menü cant switch to page 2 either, so its a pw or setup issue... i will try to figure it out with ryan.

Expand  

Glad you've at least isolated the cause of the problem. If you find a solution, please let me know if there's anything I need to do on MM side. Thanks.

  • Like 1
Link to comment
Share on other sites

@ryan my i draw your attention to https://github.com/processwire/processwire-issues/issues/1447
thats quite a big deal for us "internationals" as it affects every place where the page Lister Module is used.

i first thought it was in media manager but later noticed that its also in the page/lister/ and so on in the backend:
bug: i cant switch pages. when i click on the arrow or page number 2 on the items list i get this error:
{"error":false,"message":"Unknown Lister action"}

 

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...
  On 6/11/2020 at 9:56 PM, kongondo said:

Did you install Media Manager in a subfolder? If yes, sorry, it's a bug that occurs if you've installed Media Manager in a subfolder. It got fixed a while back but I haven't committed yet. For now, please do this:

Change this line in ProcessMediaManager.module around line #154:

"template=media-manager-settings, parent={$path},include=hidden"

to this:

"template=media-manager-settings,include=hidden"

If that's not it, then please supply more details about your setup. 

Thanks.

Expand  

Hi @kongondo, thanks fo your plugin, I just bought and installed it and am now setting things up. Just wanted to let you know I had this same problem and this fix worked for me, but I don't have Media Manager installed in a subfolder (I think). My setup is: localhost (MAMP), Media Manager is installed in Applications/MAMP/htdocs/website/site/modules/MediaManager. When I move on to the live site I will let you know if it happens there as well. If you have any questions to help find out more about this bug let me know.

edit: I'm using PW 3.0.165 and MM v0.1.2 β

Edited by wwwouter
  • Like 1
Link to comment
Share on other sites

  On 11/19/2021 at 12:40 PM, wwwouter said:

I just bought and installed it and am now setting things up.

Expand  

Thanks for the purchase.

  On 11/19/2021 at 12:40 PM, wwwouter said:

Just wanted to let you know I had this same problem and this fix worked for me

Expand  

Thanks for confirming.

  On 11/19/2021 at 12:40 PM, wwwouter said:

When I move on to the live site I will let you know if it happens there as well. If you have any questions to help find out more about this bug let me know.

Expand  

Thanks for this. Please do let us know how it goes.

Link to comment
Share on other sites

  • 3 months later...

Hi @kongondo

What is the easiest way to transfer all Media from one processwire installation to another processwire installation where media manager is installed?

What I thought about is the following:

1. Create a JSON Feed with all the absolute URLs to the PDF Files (Our customer only needs the PDFs from the old Installation) in the old Installation.
2. Create a little Importer Script which imports the data from the JSON Feed into the Media Manager in the new Installation.

For Step 2 is there any appropriate API Methods from MM available which I could use, or do I need to setup a native pw import script where I set parent, template and value for the file myself?

Additional Questions
Is it possible to fetch the locations (used on the field (CKEditor or MM Field) on this page) where each media has been used?


KR
Orkun

Link to comment
Share on other sites

  On 3/2/2022 at 7:41 AM, Orkun said:

What is the easiest way to transfer all Media from one processwire installation to another processwire installation where media manager is installed?

Expand  

Use ProcessWire's Pages Export/Import module. In the demo below, we are exporting everything. In your case, instead of selecting Media Manager as the parent, select Media Manager: Document (since you are only interested in the PDFs). It might take a while depending on the number of media pages you have. Once the zip downloads, import it using this same module (use the import from zip option). Job done. Note that sometimes you might have to repeat an import in case some files were missed. I've seen this especially with images. If you are running out of memory, you can switch to importing batches instead (use the find pages to import using selector option in that case).

Edit: Demo was supposed to show here; but forum doesn't like gifs (old problem). I have thrown the file in this archive instead.

export_media_manager.zipFetching info...

  On 3/2/2022 at 7:41 AM, Orkun said:

Is it possible to fetch the locations (used on the field (CKEditor or MM Field) on this page) where each media has been used?

Expand  

Hmm. I am not sure. I'll have a think.

Hope this helps.

Link to comment
Share on other sites

  On 3/2/2022 at 8:32 AM, kongondo said:

Use ProcessWire's Pages Export/Import module. In the demo below, we are exporting everything. In your case, instead of selecting Media Manager as the parent, select Media Manager: Document (since you are only interested in the PDFs). It might take a while depending on the number of media pages you have. Once the zip downloads, import it using this same module (use the import from zip option). Job done. Note that sometimes you might have to repeat an import in case some files were missed. I've seen this especially with images. If you are running out of memory, you can switch to importing batches instead (use the find pages to import using selector option in that case).

Expand  

Thanks @kongondo I will try that.

Now I have encountered another problem with the media manager upload itself.
I have installed it on the new system and also did all the access related adjustments.

PW Version: 3.0.194
PHP Version: 7.3.33

When I try to upload media it shows that it was successfull in the console (Ajax POST Request). But when I switch to Tab "all" it doesn't show any media.
It looks like it creates the media pages but there is no actual media uploaded.

screen1.png.c3f1ed4668b441b66ed72e28ab1abab7.png

When I edit the media pages I get this warning:

screen2.thumb.png.4c097f92a060777740716c73e09fd699.png

screen3.thumb.png.8aa7f8699cdebef6d56c53c58644167c.png


Did I forgot some setting that is causing this?



KR
Orkun

Link to comment
Share on other sites

Hi @kongondo

Found this thread https://processwire.com/talk/topic/24718-create-field-with-tags-enabled/

And I could fix it by disabling the tags option on the mm fields and then re-enabling them.

Looks like the mm version (0.1.2) I had installed on my old installation is not the latest one because it looks like you fixed the issue https://github.com/processwire/processwire-issues/issues/1287

Is there a new version of MM (0.1.3?) available?

KR
Orkun

Link to comment
Share on other sites

  On 3/2/2022 at 10:40 AM, Orkun said:

Is there a new version of MM (0.1.3?) available?

Expand  

No there isn't. I just fixed it in MM 012 as it was a very minor fix. Could you please check around line #42 of this file site\modules\MediaManager\configs\fields.json. If you have a 

"fileSchema": 7,

entry please delete that whole line.

Link to comment
Share on other sites

  • 6 months later...

Hi @kongondo

I'm new in pw and recently bought Media Manager, now I have the fallowing problem with it:

All works fine (add media, edit media, insert media in ckeditor...). But after I've create a new field (for instance "mmTest")  of type "Media Manager Field (Fieldtype)" I get this error message and I have no more access on the media manager content. It doesn't matter what else I do with this field (create template, create page), it doesn't work. After I deleted the field, everything works again...until I create a new field ("Media Manager Field") again. How can I fix it?

Best thanks for help!

Kono

 

image.thumb.png.7f36b57ba30405a38524fe6baf897113.png

Link to comment
Share on other sites

Hi @kono,

Welcome to ProcessWire and to the forums!

  On 9/10/2022 at 7:05 PM, kono said:

and recently bought Media Manager,

Expand  

Thanks for the purchase.

  On 9/10/2022 at 7:05 PM, kono said:

I have the fallowing problem with it:

Expand  

Apologies for that bad start.

  On 9/10/2022 at 7:05 PM, kono said:

But after I've create a new field (for instance "mmTest")  of type "Media Manager Field (Fieldtype)" I get this error message and I have no more access on the media manager content.

Expand  

I have tried to reproduce this on a fresh ProcessWire install (version 3.0.204 [dev]) and I am not getting the error. Could you please let me know your environment:

  1. PHP version
  2. MySQL version
  3. ProcessWire version
  4. Are you testing on a remote or local server?

In addition, could you please install the module TracyDebugger to see if it catches any errors? If your site is remote, I can have a look if I could get temporary admin access to the backend (in such a case, credentials via PM).

Thanks.

Link to comment
Share on other sites

  On 9/11/2022 at 10:14 AM, kono said:

PW-->3.0165

Expand  

This is a relatively old version of ProcessWire. Any reason why you are not on the latest main/master version (3.0.200) at least?

  On 9/11/2022 at 10:14 AM, kono said:

I use a remote server, send you the login data for test via PM

Expand  

Thanks. I'll have a peek.

Link to comment
Share on other sites

  • kongondo changed the title to Media Manager Archive
  • kongondo pinned and locked this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...