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
which unfortunately considered absolute path by Pathologic.
Can Pathologic solves this issue?
Regards
Comments
Comment #1
Garrett Albright commentedNo, 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.
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?
Comment #2
pramudya81 commentedGood idea.. make it an optional would make Pathologic more flexible.
Regards
Comment #3
Garrett Albright commentedOkay, 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.
Comment #4
pramudya81 commentedGarrett,
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
Comment #5
Garrett Albright commentedI 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.
Comment #6
himerus commentedBINGO!!!
That works perfectly, and I'm using FCKeditor... converted the link perfectly...
Comment #7
juliendorra commentedThanks 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...)
Comment #8
juliendorra commentedComment #9
Garrett Albright commentedI'll take it into consideration.
Comment #10
HansBKK commentedI 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.
Comment #11
Anonymous (not verified) commentedI 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
Comment #12
Garrett Albright commentedFrom 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?
Comment #13
Anonymous (not verified) commentedI 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.
Comment #14
Garrett Albright commentedOkay, 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.
Comment #15
Anonymous (not verified) commentedHi 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?
Comment #16
Anonymous (not verified) commentedI 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.
Comment #17
Garrett Albright commentedYes, sorry for the slow reply, but you've found a way to feed Pathologic paths it can work with. Thanks for trying Pathologic!
Comment #18
Anonymous (not verified) commentedRe. 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
Comment #19
deviantintegral commentedPathologic 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?
Comment #20
Garrett Albright commentedDocumentation update… You mean like this? I've actually had that in the documentation for a while.
Comment #21
deviantintegral commentedWhen 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.