My case:
I am using TinyMCE to post content.
I have RSS Feed for my users.
I am using 3rd party i.e. FeedBurner
And all images links broken, they become http://feedproxy.google.com/files/u2/test.jpg instead of http://www.dakiunta.com/files/u2/test.jpg

FeedBurner says this is due to relative path. But having relative path is always preferable compared to absolute one.

So I come accross this module and have great expectation on this module.
However Pathologic treats my img link as absolute urls due to "/" in effect of TinyMCE.
TinyMCE always treats image upload like this Only local images are allowed. which unfortunately considered absolute path by Pathologic.

Can Pathologic solves this issue?

Regards

Comments

Garrett Albright’s picture

Assigned: Unassigned » Garrett Albright
Category: support » feature

But having relative path is always preferable compared to absolute one.

No, not always. As you're seeing, when it comes to feeds, relative paths are useless since they're separated from your site - there's no way for a feed reader to know what a relative path is relative to. Pathologic always outputs absolute paths.

However Pathologic treats my img link as absolute urls due to "/" in effect of TinyMCE.

Arg. So many people are having this problem. I guess I underestimated the number of serious Drupal users who use it.

It looks like what I might have to do is make treatment of paths that start with / as absolute an optional feature, but enabled by default. That way TinyMCE users aren't tripped up by it so much.

Has anyone tried Pathologic with FCKEditor? Does it have the same problem?

pramudya81’s picture

Good idea.. make it an optional would make Pathologic more flexible.

Regards

Garrett Albright’s picture

Okay, so I started work on adding a check box to handle paths that began with a slash, and got pretty far along before I realized -- it's probably not even necessary…

TinyMCE users of the world, could you try this and let me know if it works? In the "Additional paths to be considered local" field, enter just a single slash. Or, if your Drupal installation is in a subdirectory like http://example.com/drupal/, enter "/drupal/" (with both the beginning and ending slashes). I bet that will be enough to kick Pathologic into action on paths that TinyMCE is creating.

pramudya81’s picture

Garrett,

Thanks for your work on Pathologic updates here... I would like to try it Pathologic with TinyMCE. But Im still on D5 so could you please update version pathologic-5.x-1.1-beta7.tar.gz too?

Regards

Garrett Albright’s picture

I don't really support the D5 version, but if you download the dev release (in red on the module page), its features are somewhat comparable to the D6 version.

himerus’s picture

BINGO!!!

That works perfectly, and I'm using FCKeditor... converted the link perfectly...

juliendorra’s picture

Title: Using Pathologic with TinyMCE » Using Pathologic with TinyMCE - The url "relative to root" , "/" problem

Thanks for the solution Garrett, I stumbled upon it by chance just before installing Pathologic !

Could it be set as default ?

It would avoid new user of Pathologic to have that kind of trouble

(And I suppose that if you use Pathologic anyway, it's because you want all your links to be fully absolute one, so...)

juliendorra’s picture

Title: Using Pathologic with TinyMCE - The url "relative to root" , "/" problem » Using Pathologic with TinyMCE, FCK, YUIEditor - The url "relative to root" , "/" problem
Garrett Albright’s picture

I'll take it into consideration.

HansBKK’s picture

I personally always use "site relative absolute" paths so I don't have to worry about:

where the link ends up being in the path structure (as I would with true relative paths)

nor

the server.domain name of the server currently hosting the page

This preference has come from static html/css development experience, and I've only just started researching this issue in relation to Drupal. This research led me to this module and of course this issue - sorry if there's a more appropriate place I should post this.

Any relevant advice (not only regarding this module) would be appreciated.

Anonymous’s picture

I have the situation where I developed locally on /localhost/drupal/

All my src and hrefs have the form /drupal/....

I implemented remotely on /public_html/drupal/ and the root is domain.com

I have to remove the /drupal/ forom all my hrefs on the live site to get it to work

Is there a way of either:

a) removing the /drupal/ on the local site and using pathologic (geat name) to insert the /dupal/ so that the live site would be without it and thus a bit more effiicient, or

b) leaving the /drupal/ in the local site and using pathologic to get rid of it on the live site.

I tried dummying up a link locally and using : /, /drupal/, and /drupal in the Additional paths to be considered local. No luck. Images were not found

thanks for any help

Garrett Albright’s picture

From what I understand, your remote site is at something like domain.com/drupal/, right? If so, why do you have to remove the /drupal/ from your links?

Anonymous’s picture

I am very new to this. When I first created the site, it needed to have domain.com/drupal/ to access the home page. If the domain was used, I got this:
______________________________________________________________________________
Index of /
Name Last modified Size Description
--------------------------------------------------------------------------------
Parent Directory 24-Jan-2009 18:13 -
Release.zip 24-Jan-2009 13:13 12.4M
cgi-bin/ 29-Dec-2008 11:51 -
drupal/ 24-Jan-2009 14:37 -
peter/ 24-Jan-2009 09:14 -
transfer/ 24-Jan-2009 12:51 -
xdrupal/ 24-Jan-2009 12:55 -

--------------------------------------------------------------------------------

Apache/1.3.41 Server at peterphrastus.com Port 80

_____________________________________________________________

They said this:

As per your request we have modified your document root
...../public_html to ..../public_html/drupal. Now yourdomain is pointing to drupal page. Since we have modified the document root, all the files and folders should become under ' ..../public_html/drupal'

The site is in fact under this directory but all my links prefixed with /drupal/ were then broken.

Now I'm lost in never land. Maybe I'm trying to use a sledghammer to fix a simple problem.

Sorry for the long diatribe.

Garrett Albright’s picture

Okay, I see. The web path doesn't have /drupal but the filepath does.

You're using Drupal 6, right? I'm not sure if the version 5 version of this module works correctly for this feature…

So for the paths that don't work, do they include the http://domain.com/ part at the beginning? If so, try entering http://domain.com/drupal/ in the "Additional paths to be considered local" field.

Anonymous’s picture

Hi Garrett

First, many thanks for your help. I am using 6.9.
This is what the paths are now:

src="/drupal/sites/default/files/HHS/mainsystem.png"

If I were to make them full paths like this on my development Windows box:

src="/http://localhost/drupal/sites/default/files/HHS/mainsystem.png"

and put http://localhost/drupal/ in the additional paths field,

would Pathologic zap this addiotional bit thus ending up with the equivalent of:

src="/sites/default/files/HHS/mainsystem.png"

in the live site environment?

Anonymous’s picture

I tried out the above scenario and it works perfectly. Thanks for this module. So, for local sites, full paths are the best. Then for live sites 'patholgic' is the best.

Garrett Albright’s picture

Yes, sorry for the slow reply, but you've found a way to feed Pathologic paths it can work with. Thanks for trying Pathologic!

Anonymous’s picture

Re. the discussion at #3 above, I have the following scenario, and configuration which (I think after half an hour) works.

I have a development site at example.com/dev/ and a live site at example.com/live/.

I am using Drupal 6, with FCKEditor. I am also using ImageBrowser to insert inline images in the text, which creates URLs such as src="/dev/sites/default/files/imagecache/small/images/xxx.jpg"

I want my users to be able to put in links to external sites and internal pages using the FCKEditor toolbar "link" button. I would prefer not to get into the confusion between "node/28" and "/node/28" so would like both to convert correctly.

The following pathologic configuration seems to work:

/dev/
/live/
/

(The single slash must be at the end or imagebrowser URLs end up as /dev/dev/...)

Looking good so far,
Tony

deviantintegral’s picture

Version: 5.x-1.1-beta7 » 6.x-2.x-dev
Component: Code » Documentation

Pathologic is solving the issue of development sites being in subdirectories (hacking your hosts file is a very difficult for many themers), and seems to be addressing the above issues quite nicely. Would a documentation update for these scenarios make sense?

Garrett Albright’s picture

Documentation update… You mean like this? I've actually had that in the documentation for a while.

deviantintegral’s picture

Category: feature » task
Status: Active » Fixed

When I initially set up the module, I skipped over that section as I wasn't dealing with WYSIWYG editors specifically. I've added a subsection explaining how the same configuration can be used when the site is moved into a subdirectory.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.