FORUMS CLOSED DUE TO SPAM. YOU STILL CAN ADD POST!

Asset manager plugin

Feed 276 posts, 32 voices

Avatar
291 posts

Create the folder by hand. Webserver usually does not have write rights to document root.

 
Avatar
42 posts

tuupola that helped with uploading, But still no thumbnail and if i click on a box it says “Forbidden

You don’t have permission to access /assets/The_Bond_by_rbenson.jpg on this server.”

Maybe you can check it with the user i sent you via e-mail?

 
Avatar
291 posts

You don’t have permission to access /assets/The_Bond_by_rbenson.jpg on this server.”

Your webserver also must create the uploaded files with read rights. Otherwise two problems occur.

  1. Thumbnails cannot be generated because PHP does not have rights to read the original file.
  2. Original file cannot be sent / displayed to the browser because webserver does not have rights to read the file.

Please make sure your webserver and PHP are properly configured.

Maybe you can check it with the user i sent you via e-mail?

Yes you can send. Of course with Frog user I cannot do much, just to see that problem exists.

 
Avatar
42 posts

when i upload a file it’s rights is 600…this isn’t right i think? i use Elion veebimajutus, you should know that firm.

EDIT: if i manually change the CHMOD to 644 then it starts to show the pic/file

Maybe you have MSN address where we could chat quicker and easyer? Don’t want to make this topic to explode of my posts :D

 
Avatar
17 posts

If your config says assets dir is /assets or assets it means files are being uploaded to wrong directory. The file should exist in:

http://173.45.236.219/frog/assets/bk-leftPanel.gif

Do I understand correctly you have installed Subdirectory frog instead of document root?

Yes I did install frog as a subdirectory. The folder is in /var/www/frog

My images currently get uploaded into /var/www/frog/admin/assets what do I need to change to make sure the images go into the correct dir?

 
Avatar
291 posts

Yes I did install frog as a subdirectory. The folder is in /var/www/frog

I did a test install of Frog into subdirectory and could not reproduce your problem. So there is something fundamentally different in your system. Without access to it can’t help. Sorry.

 
Avatar
42 posts

Tuupola where you host your website, and Kinemas for example…becouse as i have realized now my problem is in hosting service…i guess

 
Avatar
291 posts

My own sites are in Slicehost.

Kinema and many other client sites are in Data Zone.

 
Avatar
291 posts

Anybody using Vista? It seems Vista IE has somekind of security “feature” which does not allow dragging images from / in IE. Is there a way around this?

 
Avatar
35 posts

I use Vista (x64) at home and normally browse with Chrome (I like the minimalistic approach) and Firefox, and test with all the major browsers (IE, Safari and Opera as well). I tested assets dropping images in the bin with Chrome, FF and IE, and they work as expected.

Edit 16h54: Currently tested assets with IE8, not 7.

 
Avatar
35 posts

BTW, Tuupola, you remember our conversation about disabling Assets plugin and when enabling again you have to provide the paths to Assets again? I agreed with you a good program won’t leave stuff behind after uninstallation?

Well, I need to upgrade a site from 094 to 095, and was reading the update instructions:

5. Login to the admin section of your 0.9.4 installation and disable all
plugins. (plugins generally shouldn’t remove data from the database when being
disabled, so this shouldn’t be a problem.)

Maybe this, as I assume this installation method will be around for some time, would beg for a code change for now anyway. Just a suggestion.

 
Avatar
25 posts

How do get is so asset manager shows more them 8 pictures in the side bar next to a post? I have around 16 – 20 pictures there but is only shows 8 when I am trying to post?

Thanks

 
Avatar
291 posts

cu3edweb: Not possible at the moment. It is in my TODO list.

wiag: I agree. I most likely will change the behaviour. Also thanks for testing with Vista. I have seen Vista IE NOT being able to drag images. Maybe that computer had some extra security settings…

 
Avatar
35 posts

To Fix The Assets Empty Image Box Problem:
======================================

People, I’ve been working on a new site and added the latest assets plugin (and its required friends image_resize, jquery and jqueryUI) and still had problems to get it working, even though all settings were exactly as in another site where it did work.

To help others finding out where it all might go wrong, there are a few important things:

  • Check the image_resize documentation page in Frog Admin, to see if GD-lib and Mod-rewrite work.
  • Permissions on the assets folder should be granted so that the webserver/Frog-PHP-script can read, write and create files there.
    I use the public folder for my assets and created the folder /public/images from within Frog, so permissions is not a problem.
  • Images should be uploaded with Frog preferably, not with FTP, so Frog has permissions to read and write those files too.
  • If you have this right, and you still get empty boxes on the Assets tab in the Admin interface, disable the plugins assets, image_resize, jquery, jqueryUI, and re-enable them.
  • AFTERWARDS, disable the Page not found plugin, and re-enable.

As if magic, this might do the trick!

I had this problem before, and forgot this solution, so I had to figured it out the hard way again.

 
Avatar
291 posts

AFTERWARDS, disable the Page not found plugin, and re-enable.

It seems order of the plugins matter. This fix causes Page not found plugin to be run last. If Page not found was run before Image Resize then image would never be resized. README of Image Resize also has this:

How to use Image Resize together with the Page Not Found plugin

If you want to use Image Resize with Frog’s Page Not Found plugin, you will have to include the following code at the top of your customized Page Not Found page:

<?php image_resize_try_resizing() ?>

This is necessary because the Page Not Found plugin will be called before Image Resize, so the call will never make it to Image Resize which in turn can’t convert the image.

For some reason you will have to reload a page twice before the image appears.

 
Avatar
291 posts

Also forgot to mention that starting from 0.4.5 Assets plugin shows you a warning if it does not detect proper gif, png or jpg support. For example:

 
Avatar
35 posts

@tuupola

I use the plugin, without the code modification/addition.

Works for me, but Page-not-found-plugin needs to be disabled and enabled after adding Assets/Image-Resize and the lot.

I don’t have to wait for a reload to see the images that need to be generated. They will popup after some time.

The only time I have to reload is if I use PHP to create some special sized version of an image. E.g. see my little marketplace. There I build the images on the basis of subpages, with a special page part for the image that becomes an thumbnail.

 
Avatar
291 posts

I use the plugin, without the code modification/addition.

Works for me, but Page-not-found-plugin needs to be disabled and enabled after adding Assets/Image-Resize and the lot.

Your way is actually better. Code modification is bad :) It definitely seems to be case of plugin order. I guess Image Resize could force Page not found to be the last in the internal list.

 
Avatar
35 posts

@tuupola, if you could build it into the code to push Page-not-found to be executed later/last, that would be great, but otherwise state this procedure in the readme/instructions.

Dependancies, dependancies… O well. Code is more high maintenance than women, and sometimes it seems all logic is lost on it. (Although we know it’s just complexity that we are grappling with).

 
Avatar
6 posts

Thanks guys!

Dis/re-enabling the 404 plugin did the trick! Even without the extra call to image-resize function in the page-not-found page.

Document this :-)

Dave

 
Avatar
291 posts

It is now mentioned in both plugin homepage and the README file.

 
Avatar
184 posts

The new version is working fine now. Not sure if it is just the update, but either way, this worked for me:

1. Installed Frog 0.95 r446
2. Ensured Page not found plugin was disabled.
3. Installed and enabled lastest jQuery plugin.
4. Installed and enabled lastest jQuery UI plugin.
5. Installed and enabled lastest Image Resize plugin.
6. Installed and enabled lastest Assets plugin.
7. Saved assets folder directory in Assets Settings page.
8. Enabled Page not found plugin and created page with (<?php image_resize_try_resizing() ?>) in it.

 
Avatar
35 posts

@BlueFrog: If you leave out the second part of step 8 (the php-call) it should be working also. Maybe you could test that, so image resize will not be called twice.

 
Avatar
184 posts

Re: wiag

Yes, I can confirm it works without calling image_resize_try_resizing() in the ‘Page not found’ page.

 
Avatar
6 posts

So the bug in combination with the Page Not Found plugin has a fix, but now I still have a white-boxes problem.

The plugin writes my thumbnails with the SERVER path instead of a ‘web path’: so it points an <IMG> element’s SRC to ‘/var/www/webapps/username/assets/foo/file.jpg’ instead of ‘/assets/foo/file.jpg’. Any ideas?

UPDATE

Together with Tuupola we figured it out. In my case it had to do with a Webfaction hosted account. Webfaction changed the DOCUMENT_ROOT and added an underscore ““ to it (dunno why). My $_SERVER[‘DOCUMENT_ROOT’] became e.g. _”/home/username/webapps/“_ That last underscore prevented Tuupola’s code from working.

There is a fix on the Webfaction Support site. The complete text is below. I followed the instructions and it worked!

HOW DO I SET MY PHP DOCUMENT_ROOT?

If your PHP application is reporting ‘/home/username/webapps/_’ as DOCUMENT_ROOT and you need it to be something else, do the following:

Assuming your Static/CGI/PHP app is named “my_app”…

Create ~/webapps/my_app/set_document_root.php with the following contents:

<?php 
  $_SERVER['DOCUMENT_ROOT'] = '/home/username/webapps/my_app'; 
?>

Create ~/webapps/my_app/.htaccess (if it does not exist already) and add the following to it:

<IfModule php5_module>
    php_value auto_prepend_file "/home/username/webapps/my_app/set_document_root.php"
</IfModule>