Hi!
I am trying Pathologic to migrate from Path Filter and I am having an issue.
I have a production site published ad http://hostname/sitename and I need to create a test copy and publish it as http://hostname/sitename_new.
All images previously embedded in nodes using IMCE and FCKEditor did not work in the copied site and I read this could be related to the fact that FCKEditor set the images path as /sitename/... and indeed the path of images is still http://hostname/sitename/...
Then I installed and configured Pathlogic and disabled Path Filter. Following the installation guide, I also added /sitename/ in "Also considered local" option. But it does not work. When I checked the images path I found that the filter is generating the following url:
http://hostname/sitename_new/sitename_new/...
instead of
http://hostname/sitename_new/...
So it dows the path substitution but it duplicates the subdirectory...
Am I missing something?
Thanks for all,
CyBerto
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 818120-pathologic-subdirectories.patch | 3.24 KB | Garrett Albright |
Comments
Comment #1
hbar commentedI'm having a similar issue on a local site I'm building. Some inline images I inserted using Image Assist are displaying as broken. The rendered html source is displaying a duplicated directory, but in my case, the site's root directory.
The inline image code is like this:
<span class="inline inline-right"><img src="sites/all/files/images/my-image.thumbnail.jpg" alt="" title="" class="image image-_thumbnail " width="100" height="122" /></span>But the rendered code is like this (note the duplicated directory):
<span class="inline inline-right"><img src="http://localhost:8888/my-site/my-site/sites/all/files/images/my-image.thumbnail.jpg" alt="" title="" class="image image-_thumbnail " width="100" height="122" /></span>I tried adding a single slash (/) in the "Also considered local" field, but got the same result. I also tried unchecking the "Output full absolute URLs" checkbox, but still got the same result.
My input filters are ordered like this:
I just updated Pathologic today, and I think this problem didn't exist before.
Edit: It also happens with handcoded links:
<a href="node/123"</a>is rendered as:
http://localhost:8888/my-site/my-site/node/123Thanks. And also thanks for the module. :-)
--
hbar
Comment #2
Garrett Albright commentedDang, where where you people when this was in beta?
I think I found the problem and committed the changes, so please be on the lookout for the newest dev release and give it a try and report back. If it hasn't been packaged yet, you're anxious to get your site back, and you know how to patch, try the attached.
Comment #3
valderama commentedseems like i have the same problem with the drupal 7 version of pathologic
[UPDATE]
the problem is that the 'path' part of the url is taken ( $parts['path'] ). If the URL is localhost/drupal7/myimg.gif, then 'drupal7/myimg.gif' is given to the url() function, which results in this wrong URL: localhost/drupal7/drupal7/myimg.gif
[UPDATE2]
just a guess: maybe using drupal_parse_url instead of parse_url helps?
For me that works, but I have no URLs with parameters etc.
Comment #4
hbar commentedThanks for that. I applied your patch and the problem appears to be fixed! Very pleased by your fast response. First time I applied a patch, surprised how easy it was!).
Sorry I wasn't testing your beta, I only installed Pathologic recently for a new site I'm building (having previously used the Path Filter module). Great work though. Thanks again, Garrett!
--
hbar
Comment #5
Garrett Albright commentedOkay, I've made a new release with these changes. Thanks for testing, hbar.
Comment #6
cyberto commentedHi!
I also agree with hbar: thanks Garrett for the fast reponse. I also tried the patch (first time for me too) and it worked. Now I am updating the module.
Bye
CyBerto