Hi, this sounds like a duplicate of other issues, but I have tested all D7 versions of Pathologic and get the same issue:
NB: On my dev machine I do not have clean URLs enabled
When I enable Pathologic it replaces Drupal paths beautifully from node/7 to aliased/path-to-article
BUT images disappear as their src is being changed from /sites/default/files/images/the-image.jpg to /?q=sites/default/files/images/the-image.jpg

I saw a response somewhere else to add file: to the start of the src but that is not an option if the client is going to edit this content.

Thanks

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Garrett Albright’s picture

Title: Images src getting /?q= prepended » File paths prepended with ?q= when clean URLs are disabled

Hmm. Thanks for bringing this to my attention. It's kind of tricky because there are conversions that Pathologic may need to do on a path to a file which are legitimate, so we can't just ignore file paths, but at the same time, yeah, things sort of break when clean URLs are not enabled right now, I see. I'll give this a look and see what can be done.

Garrett Albright’s picture

Hmm, well, I made this. Kind of afraid to commit it, though, since I'm afraid it might break things for folks for whom the current functionality with regards to files works just fine. Anyone with such a site out there who might be willing to be a guinea pig for me? =/

Garrett Albright’s picture

Status: Active » Closed (fixed)

Okay, I bit the bullet and finally made a 7.x-2.0 release today, and I included this patch. Closing this issue for now; please re-open if there are still problems.

Garrett Albright’s picture

Version: 7.x-2.0-beta5 » 7.x-2.x-dev
Status: Closed (fixed) » Needs work

Okay, the fix for this was causing more problems than it fixes, so I had to revert it for now. I'll have to take another look at this in the near future.

Garrett Albright’s picture

Status: Needs work » Needs review

Okay, I've just pushed a new set of possible fixes. If you could, please check out the latest dev release (created after this post) and let me know if it works for you.

Garrett Albright’s picture

Status: Needs review » Closed (fixed)

I just created a new release which should incorporate the bug fix for this. Please give it a try. If it still seems broken, please re-open this issue and let me know what's up.

Garrett Albright’s picture

Status: Closed (fixed) » Fixed

Oops, wrong status.

Status: Fixed » Closed (fixed)

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

Andreas Kohlbecker’s picture

Status: Closed (fixed) » Active

This is still not working in the most current versions of the pathologic module 7.x-2.6 and 7.x-2.x-dev (2012-Oct-27).

for example the image path src="/d8/foo/sites/bar/files/images/770.jpg" is converted to http://localhost/d7/foo/?q=d8/foo/sites/bar/files/images/770.jpg

The text format being used in this case is Full HTML and has the following options turned on:
* Convert line breaks into HTML
* Correct URLs with Pathologic

Filter processing order:
* Convert line breaks into HTML
* Correct URLs with Pathologic

neither any of the Processed URL formats works with the following base paths:
* /d8/foo
* http://localhost/d8/foo
* //localhost/d8/foo

The resulting url always contains the "?q=" when clean urls is turned off

Garrett Albright’s picture

Andreas, in your example above, what is the path to the root level of the Drupal installation? You have http://localhost/d8/foo in your base path field, but your example uses http://localhost/d7/foo/ .

StevenPatz’s picture

Priority: Normal » Major

I am using version 7.x-2.10. All my links except for those for images are working correctly. For image paths I get something like this:

http://www.example.com/CLIENT/?q=files/conference-files/conference2013_c...

If I manually through firebug remove the ?q= the image shows up, confirming that the image exists at that path.

In my Pathologic settings I have the first bullet checked ( Full URL (http://example.com/foo/bar ) and in the "All base paths for this site" section I have /CLIENT/

Is this a settings issue? I am willing and able to test patches etc.

Garrett Albright’s picture

spatz4000, can I have a bit more info? I presume "CLIENT" is the root directory of your Drupal installation, right? What was your input to get that output?

Garrett Albright’s picture

Issue summary: View changes
Status: Active » Postponed (maintainer needs more info)

Is this still a problem?

  • Garrett Albright committed cf3b58f on 7.x-3.x
    [#1672430] Try to better deal with paths to files when clean URLs are...
mgifford’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

I'm marking this as closed for now. Feel free to reopen.