PDA

View Full Version : Unable to make relative link using the editor


jimraff67902
12-18-2009, 05:22 AM
I want to create a simple link to a page within the site using the standard FCKeditor.

The Link--Webpage Dialog window opens and I click on the "Browse Server" button but an error message pops up with the following text:

Error creating folder "/home/sites/etc..../web/file/" (mkdir() [<a href='function.mkdir'>function.mkdir</a>]:Permission denied)

How do I fix this? My server uses PHP and Linux and I have full root access to change directory or file permissions - but I do not want to give permission to the powercms admin person to create new directories etc on my server!

Jason Byrnes
12-18-2009, 10:02 AM
It is trying to create a directory named "file" in the "web" directory, it is trying to create this directory because it does not already exist. You could create it manually to prevent the FCKEditor from trying to create it.

jimraff67902
12-29-2009, 08:56 AM
Hi Jason,

I have created a folder called "file" within the "web" directory but I get a message "invalid file type" if I try to upload a file from within Dreamweaver. In any case the file already exists within the site - I do not want to duplicate it in another folder!

Here is the Dreamweaver CS4 file architecture which is identical on the server:

site -mywebsite.com (C:\etc\etc.........)
index.php
file_being_edited _within_PowerCMS.php
file_I want_to_link_to.php

What I want is a simple relative link of the form <a href="file_I want_to_link_to.php">text_that _makes_the_link</a>

The hyperlink is being made within the text of the "mainContent" element of the page being edited.

When I click on the icon I see the Link--Webpage Dialog window which has an address http://www.mywebsite.com/WA_iRite/editor/fckdialog.html but I cannot use the "browse" button to locate the target file on the server. I get a new window with a file upload panel whose address is http://www.mywebsite.com/WA_iRite/editor/filemanager/browser/default/browser.html?Connector=../../connectors/php/connector.php.

The file addressed ../../../../default/browser.html will not appear in Dreamweaver. I get frmresourcetype.html instead. The javascript link in browser.html includes this redirect.

So how do I fix this?

Eric Mittman
12-29-2009, 04:36 PM
When you are getting the invalid file type message please describe exactly what you are doing and where you are at when this occurs.

You should be able to use the link button to insert a link to a page. If the page already exists on the server you should be able to select 'Browse Server' to select the file. What happens for you when you attempt to browse the server?

You can also just add in a link yourself to the page by changing the protocol to <other> and just specifying the relative path to the page from where this page will be served from on the site.

jimraff67902
12-30-2009, 03:25 AM
This is the sequence:

1. Open the admin home page in IE8 and select a page to edit - works OK: 3 editable areas are PageTitle, Intro and mainContent
2. Click on edit/update icon for mainContent - works OK: shows some text.
3. Highlight a small piece of text and then click on the Insert/Edit link icon on the toolbar
4. Link--WepageDalog window pops up.
5. Hilite the "URL" dropdown and leave the "Protocol" selected as "http://" then click on "Browse Server"
6 A new window appears with the address "http://www.mywebsite.com/WA_iRite/editor/filemanager/default/browser.html?Connector=../../connectors/php/connector.php". No files from the server are listed in this window - is this the problem?

This window shows an open folder icon next to a dropdown arrow (nothing happens when this is clicked). A left-hand panel has the heading "Resource Type" with a drop down containing "file, image,flash, media. The bottom of the window contains an image "Create a New Folder", an input field with the title "Upload a new file in this folder" and "Browse" and Upload" buttons".

If I then browse to a local file on my PC and try to upload it I get the error box "Invalid file".
If I try to create a new folder I can open a dialog box to type in the new folder name but if I submit this I get the error message "You have no permissions to create the folder".

Eric Mittman
12-30-2009, 04:20 PM
When you are in the link view and browse the server you should make sure to select file from the select list at the top. This should allow you to upload any of the allowed file type:

'7z', 'aiff', 'asf', 'avi', 'bmp', 'csv', 'doc', 'fla', 'flv', 'gif', 'gz', 'gzip', 'jpeg', 'jpg', 'mid', 'mov', 'mp3', 'mp4', 'mpc', 'mpeg', 'mpg', 'ods', 'odt', 'pdf', 'png', 'ppt', 'pxd', 'qt', 'ram', 'rar', 'rm', 'rmi', 'rmvb', 'rtf', 'sdc', 'sitd', 'swf', 'sxc', 'sxw', 'tar', 'tgz', 'tif', 'tiff', 'txt', 'vsd', 'wav', 'wma', 'wmv', 'xls', 'xml', 'zip'

If the file type you are trying to upload is not in this list it can be added so you can upload that type of file.

Do you have anything specified in your globals file for the relative images path? If so do you see the contents of this directory when you select image as the type at the top of this browse window? When I change the list to file type I can see the root of my site and all of the files and folders within it, what do you see when you have files selected?