I'm not sure if this is a bug report or support request. I believe that I have everything set up properly, but Pathologic doesn't seem to be doing anything at all on my image or anchor tags.
1. I have installed and enabled the module.
2. I have configured it to work on full HTML. It is the second to last filter in order list. Image resize is last.
3. I have put the url of my dev server "http://occu-dev:8888/" and "/" into the also considered local path field on two separate lines without the quote marks.
When I move to my other server at http://occu-example/, I would expect the paths to be changed to http://occu-example/... when the HTML is output to the browser, but they are not. Neither the image paths or anchor tags are being changed. The first server is running on MAMP on my Mac and the second one is running on XAMP on my PC. As far as the settings go, it doesn't seem to make a difference if I check or uncheck the "Output full absolute URLs" box. It also doesn't seem to make a difference if I have the baseurl commented out or working in the settings.php file. Caching is turned off, but I have cleared the cache anyway. I am using the WYSIWYG module with CK editor. I have also tried turning off the image resize filter. I am also running URL filter, line break and HTML corrector before pathologic and image resize after pathologic.
Any ideas why pathologic would not be doing anything? This is a great module and I would really love to use it.

Comments

nrackleff’s picture

Some followup. I tried creating a completely new input format. I applied only the pathologic filter to that format. No other filters at all and it still does nothing. I also cleared the cache. Any ideas?

Garrett Albright’s picture

Well, hmm. Two things to check:

1. Maybe this is dumb, but are you sure that the text you're looking at is being filtered through the format which uses Pathologic?

2. If you try entering a path that's just like foo (no http:// or slashes at the beginning), does Pathologic do anything to that?

nrackleff’s picture

I appreciate the help. In answer to the first question about the format using Pathologic, I have turned Pathologic on for all of the formats that I have: filtered HTML, full HTML and PHP and it is always the last one in the list, except for image resize if the format allows images. I am using CK editor with WYSiWYG and we are talking about content in the body field so I assume it would be getting parsed.

Second, I added foo to the "also considered local" list. I cleared the cache and viewed the page and "foo" remained unchanged in the HTML output. My image tag begins "img alt="Firefox logo" src="foo/sites/default/files/images/firefox_0.gif" ..." when I view source.

This is the first time I have used this module, so I'm wondering if I've made some silly mistake, but the module is enabled and I believe I have followed the instructions correctly. Are there any known incompatibilities with CK editor or anything?

Anonymous’s picture

I'm also having this issue on the 7.x-2.x branch and it seems to be a duplicate of #361785: pathologic not working with FULL HTML input format. In my case, I am working with two copies of the same site. They aren't exactly the same, the only major difference being that the "new" copy was upgraded from D6, whereas the other was simply a new site from scratch. The content types, views, etc. are the same in both.

On the first site, I enabled the module, cleared the cache, and then enabled the filter on my Full HTML and Filtered HTML profiles. I added my live site domain to each, and then upon returning to the homepage I was getting all the URLs formatted the way I wanted. Great!

Then I took the module over to our newer (d6 upgraded) copy of the site. I enabled it, cleared the cache, put it onto my text filters as last time... and nothing happens. I double checked the URL to see if maybe an invalid typo was breaking it but everything looks OK. I can't think of anything I've done differently. I tried running the uninstaller but when I re-enabled the settings were still there... I figured I would take a look at the .install file and the only thing that I can think of is maybe the D6 upgrade code was trying to run (or not?) at some point. Thoughts/suggestions?

Anonymous’s picture

I'm giving up on this module, which really sucks because I thought it would be so cool... but so far 4h of trying and no progress.

I've tried about every possible solution I can think of and no matter what I try it is always a no-go and the URLs return with no change. I have tried changing the order of the filters, enable/disable/re-enable, different URLs to act on, clearing lots of caches, some manual DB configuration changes and then rolling those changes back.

The "also considered local" box is not available in the 7.x branch and I'm thinking that it might be the cause, but I am not certain.

From reading through the issue queue I feel the need to put out these additional details that might help the next person:

  • The default language on this site is French
  • One of the input formats I tried was from the D6 days, upgraded, but the other I want to change is new
  • I tested only one filter using the module at a given time
  • Putting all the URLs into the configuration as suggested also does nothing, including the "single slash" option
  • I get a lot of watchdog errors for images that could not be resized by my staging site because they don't exist there, they are only on live.
Garrett Albright’s picture

Ryan, it sounds like something pretty strange is going on on your site. To be clear, is the problem you're having with the Drupal 7 version of the module, or the Drupal 6 version? You seem to be implying the former, but this issue's Version field is set to the latter. Also, you say "The 'also considered local' box is not available in the 7.x" - it certainly is, though its title is "All base paths for this site." The functionality should be the same, though. Are you not seeing this field for some reason?

If you haven't completely given up on Pathologic, then let's see if we can work through this and figure out what's going on.

Rj-dupe-1’s picture

Perhaps I should be creating a new issue for this but it matches the original description, so I'll try to add more detail here, in the hopes that some of the people following it get a solution.

Like OP, we've got pathologic configured as the last filter in Full HTML with CK and WYSIWYG, with / also considered local and Output full absolute URLs checked. The markup that is in the body is:

<div style="margin-top: 30px; margin-bottom: 30px; height: 121px; clear: both"><a href="reducecost"><img src="/files/cost2b.jpg"></a><div style="margin-top: -121px; margin-left: 200px"><a class="title" href="reducecost" style="font-size: 16pt; font-weight: bold">Reduce IT Cost</a> ...text</div>

Our problem is that the link around the image and the link to the image itself is only partially rewritten, while the link in the text gets the full absolute URL:

<div style="margin-top: 30px; margin-bottom: 30px; height: 121px; clear: both"><a href="/reducecost"><img src="/files/cost2b.jpg"></a><br>
<div style="margin-top: -121px; margin-left: 200px"><a class="title" href="http://rewritten.to.correct.domain/reducecost" style="font-size: 16pt; font-weight: bold">Reduce IT Cost</a> ...text</div>
</div>

Pathologic is certainly engaging, since some things are being rewritten... but not everything, or rather, not everything is being rewritten in the same way.

Incidentally, I can detect no difference in output with / set as local or not (and I clear all caches religiously).

Anonymous’s picture

Version: 6.x-3.4 » 7.x-2.4

My post was for the D7 version, I should have probably reposted under another title or changed the version on this post.

I would like to revisit this module sometime next week but I am not sure if I will have the time yet. Thanks for your attention to this issue!

I'm changing the version of this to D7 now... sorry D6 folks! I hope we can all get this working!

Rj-dupe-1’s picture

Version: 7.x-2.4 » 6.x-3.4

Yeah, you should definitely have created a new issue then Ryan. The issue I identified matched OPs though, so please stop messing up this bug by changing things.

Garrett Albright’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

Closing this old issue. Unfortunately the 6.x branch is no longer maintained, so any bugs in there are going to stay in there. Sorry, but it really is time to upgrade.