close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

image path

Thread began 6/29/2009 3:21 pm by roby258376 | Last modified 7/29/2009 5:43 am by MickW | 4994 views | 13 replies |

roby258376

image path

Hi folks,

Just started using CMS this morning, and I'm working on getting it all to fit together properly.

One issue I seem to have is with the images path. Instead of being uploaded to the images directory, they are being uploaded to the root of the site.

1) I have CMS installed in the root of my site, so it's not in it's own directory. Is that a problem? as a result I have the following set:

$WAGLOBAL_localRoot  = ""; //relative path to your PowerCMS files on your local testing server.
$WAGLOBAL_remoteRoot = ""; //relative path to your PowerCMS files on your remote server.



2) I have edited the WA_Globals.php file to

//iRite Images upload settings
$WAGLOBAL_Images_Folder = "../images/"; //relative path to your images folder.
$WAGLOBAL_Swf_Folder = "../swf/"; //relative path to your swf folder.



but the images still end up in the root.

Has anyone got any ideas how I can fix this?

Sign in to reply to this post

Neil Beadle

There shouldn't be any problem with storing the PowerCMS files in the root of your site.

If those images and swf folders that you want the images and swfs to upload to is in the root as well, you shouldn't need the "../".

Try removing it and just leaving the following specified:
$WAGLOBAL_Images_Folder = "images/";
$WAGLOBAL_Swf_Folder = "swf/";

Sign in to reply to this post

roby258376

Hi Neil,

Thanks for getting back to me on this.

I decided yesterday, for the sake of organization to put the CMS files in their own directory called PowerCMS, so the structure has changed a bit, but no matter what I do, or how I configure my WA_Globals.php file, the images go straight to the root. I then have to change the path in order to insert the image into any page.

My code now reads...

$WAGLOBAL_Root_URL = "http://www.mysite.ca/" ;  //Absolute path to your site folder.
$WAGLOBAL_Site_Name = "MySite" ;

$WAGLOBAL_localRoot = ""; //relative path to your PowerCMS files on your local testing server.
$WAGLOBAL_remoteRoot = "/PowerCMS/"; //relative path to your PowerCMS files on your remote server.

//iRite Images upload settings
$WAGLOBAL_Images_Folder = "images/"; //relative path to your images folder.
$WAGLOBAL_Swf_Folder = "swf/"; //relative path to your swf folder.



Any other suggestions? it seems from reading this forum that a few other users have had the same issue as well.

Sign in to reply to this post

Neil Beadle

My first suggestion is that you submit a support ticket. Depending on how busy we are it could take a while for someone to get back to you. There may be some sort of unique situation with your server that is causing this to not work properly.
techsupportinsert_1.php

Here are a couple things that may help get this working....

Since you are not testing locally - copy the setting you have for remoteRoot to the localRoot setting.
$WAGLOBAL_localRoot = "/PowerCMS/";
$WAGLOBAL_remoteRoot = "/PowerCMS/";

PowerCMS does a check to see if it is being used locally or remotely, but if nothing is specified in the localRoot setting, it assumes it is being tested locally and uses the root of the site.

Also, make sure the images and swf directories exist on the server.

Sign in to reply to this post

Paul

same problem

This post has been deleted.

SozoCreative

Possible Solution

After experiencing the same image path uploading problems, reading all the posts and making many attempts to solve my problems, I may have stumbled onto the solution:

I have my powercms in a subfolder called "cms" with my uploaded images supposed to be sent to /cms/uploads (uploads)

WA_Globals.php:

$WAGLOBAL_localRoot = "/cms/";
$WAGLOBAL_remoteRoot = "/cms/";

//iRite Images upload settings
$WAGLOBAL_Images_Folder = "../cms/uploads/";
$WAGLOBAL_Swf_Folder = "../cms/uploads/";


At the top of the html in my pages (wherever I'm using powercms), I have added:

<?php include "cms/Connections/localhost.php"; ?>
<?php include "cms/WA_CMS/WA_CMS.php"; ?>


Now for my possible solutions for the image path problem:

Go to WA_iRite > editor > filemanager > connectors > php > config.php

In the notes of config.php, lines 97-109 caught my attention.

I then changed lines 124 & 125 from

$Config['QuickUploadPath']['Image'] = $Config['UserFilesPath'] ;
$Config['QuickUploadAbsolutePath']['Image']= $Config['UserFilesAbsolutePath'] ;

to this:

$Config['QuickUploadPath']['Image'] = $Config['FileTypesPath']['Image'] ;
$Config['QuickUploadAbsolutePath']['Image']= $Config['FileTypesAbsolutePath']['Image'] ;


And I changed lines 131 & 132 from

$Config['QuickUploadPath']['Flash'] = $Config['UserFilesPath'] ;
$Config['QuickUploadAbsolutePath']['Flash']= $Config['UserFilesAbsolutePath'] ;

to this:

$Config['QuickUploadPath']['Flash'] = $Config['FileTypesPath']['Flash'] ;
$Config['QuickUploadAbsolutePath']['Flash']= $Config['FileTypesAbsolutePath']['Flash'] ;


I've tried it out several times so far in the past few minutes and it appears to now be working the way it was supposed to. This might be the fix that we need when PowerCMS is in a subfolder and images are uploaded to a subfolder within the PowerCMS folder.

Sign in to reply to this post

MickW

I thought I'd add to this as I too am having problems with my image paths - the solution posted by SozoCreative is the closest I've got, thanks, (my 'setup' is very similar) but it doesn't seem to work in IE6 for reasons I'll explain..

All my PowerCMS files are contained in folder called 'cms' (cms/).
I would like images to be uploaded to cms_images/
I don't have a local testing server.

This is my WA_Globals.php:
$WAGLOBAL_Root_URL = "http://www.mysite.co.uk/" ; //Absolute path to your site folder.
$WAGLOBAL_Site_Name = "Admin" ;

$WAGLOBAL_localRoot = "/cms/"; //relative path to your PowerCMS files on your local testing server.
$WAGLOBAL_remoteRoot = "/cms/"; //relative path to your PowerCMS files on your remote server.

//iRite Images upload settings
$WAGLOBAL_Images_Folder = "cms_images/"; //relative path to your images folder.

When I go to the editor and upload an image with iRite this is what I get (Before amending the config.php file as described in the previous post)......

If I click the 'Upload' tag in 'Image Properties' and use that dialogue to upload an image it is placed in image.jpg but the URL displayed in the 'Image Info' tag is image.jpg. Of course the image doesn't display in the preview.
Manually changing the URL to image.jpg successfully displays the image in the preview.
(Clicking browse server shows no files).

With the same settings in WA_Globals.php if I click 'Browse Server'and use the upload facility in the iRite Resources Browser the images is shown in the browser, but when clicked doesn't display in the preview.
The image is actually placed where I want it in image.jpg but the URL shown in Image Properties is image.jpg. Again if I manually change this to the actual URL of the image it displays.

Should files be uploaded via the 'Upload' tag or via 'Browse Sever'? or both? They seem to work differently.

Using $WAGLOBAL_Images_Folder = "/cms_images/"; doesn't change anything except that the URL in Image Properties becomes image.jpg.

Now when I amend the config.php file as described by SozoCreative the image is uploaded to the correct location but the code that appears in the Image Properties URL and is subsequently placed in the page is: "http://www.mysite.co.uk/../cms/cms_images/01_mirror.jpg".

The page renders ok in Firefox, Chrome and IE8 but not in IE6 I can only assume it's because of the '../' in the code.
Pasting 01_mirror.jpg directly in the address bars of Firefox, Chrome and IE8 displays the image and the URL is automatically altered to 01_mirror.jpg - IE6 doesn't do this, it displays page not found.

I would be grateful for any help anyone can give to help me to get this to work as it should - This is for a client and I really don't want to have them editing URLs or source code.

Thanks

Sign in to reply to this post

SozoCreative

Wouldn't you want to change

//iRite Images upload settings
$WAGLOBAL_Images_Folder = "cms_images/"; //relative path to your images folder.

to this

//iRite Images upload settings
$WAGLOBAL_Images_Folder = "../cms/cms_images/"; //relative path to your images folder.

I tried multiple formats and I do know that it may vary based on the server, but the latter option worked for me.

[oops! just finished reading your post above; odd isn't it. Have you only tried "/cms/cms_images/" (which didn't work for me) or also "../cms/cms_images/"?]

When the code is fine tuned and working properly (as on mine), I can use both features - browse server and upload photo - and they work perfectly: proper urls, photo appears, no hassle for the client at all.

Sign in to reply to this post

MickW

Sorry - I wasn't clear..

Yes I tried "/cms/cms_images/" and "../cms/cms_images/".

This is where I am now.

The config.php file is amended at lines 124/5 as described.
(As an aside I don't think that having purchased the software I should have to be changing source code like this).
WA_Globals.php is: $WAGLOBAL_remoteRoot = "/cms/";

Setting $WAGLOBAL_Images_Folder = "../cms/cms_images/"
inserts "../" into page code and images don't display in IE (as described in previous).

Setting $WAGLOBAL_Images_Folder = "/cms/cms_images/"
inserts "//" into code and places images in "http://www.mysite.co.uk/cms/cms/cms_images/"
(the directory didn't exsist and was created automatically).

Setting $WAGLOBAL_Images_Folder = "cms/cms_images/"
appears to do the job in PCMS - the correct code (src="http://www.mysite.co.uk/cms/cms_images/image.jpg") is written however the file is actually located at "http://www.mysite.co.uk/cms/cms/cms_images/" on the server.
Now strangely the image displays correctly in Firefox but not in IE. The source code is as above but the image doesn't exsist at that location. If I copy the url from image properties in the browser and paste it into the address bar I get a page not found error (as I should).
Why is Firefox displaying an image correctly when the code points to the wrong location? (I cleared the cache).

My next move is to move the destination folder for the images out of the /cms/ directory and see what happens.

***Edit*** When I say 'appears to do it's job - the image appears in Image Properties when using Firefox, but in IE the image is not displayed - just the red 'x'.

Sign in to reply to this post

tim.nealon288075

Same types of problems...didn't want to start a new thread..

The problem I am having is similar to what you guys are describing, and I cannot figure it out either. I have the cms files in their own folder, cms/. I obviously have some files in the site root such as index.html and the images folder. Inside the images folder, I have the uploaded images folder. Also, in the site root, I have folders for other pages of the site.

When I view the pages through the cms, as if to edit, I don't view the images, only the red x. The paths are correct. Since the images folder is in the site's root and not the cms folder.

//iRite Images upload settings
$WAGLOBAL_Images_Folder = "../images/uploaded-images/"; //relative path to your images folder.
$WAGLOBAL_Swf_Folder = "../images/uploaded-images/"; //relative path to your swf folder.

However, I still cannot view any of the images when I view the content through the editing panel of the cms. In addition to this, when I try to upload a file, it tells me that the image is sent it to the site's root, which is not where it should be going, it should be going to images/uploaded-images/. To add insult to injury, it tells me the upload is successful, yet it uploads nothing.

Like someone else on here, I feel that these problems should not be occuring when the product is sold as a solution package with 'no coding knowledge'. Working with php and is not my strong point, which is exactly why I dished out the money for this product.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...