How would you recommend I would debug this?
I have two domain names that are sort of pointing at the same server: http://interactive.wxxi.org and http://whatthetech.org. The 2nd one isn't configured quite right (still trying to find time to figure out what's going on there), but we definitely own the domain.
We are using http://interactive.wxxi.org as our main Drupal install.
I have a situation where images inserted with image assist are appearing properly within posts (in this case blog entries). BUT...
When displayed as part of a "view" -- a collection of previews, images posted with image assist will only show up if there is at least one space before and after the [square bracketed tags]...
So, for example: This works:
Fruit flies like a banana [img_assist|nid=734|title=Eric Taylor 2|desc=|link=node|align=right|width=213|height=250]
This fails
Fruit flies like a banana[img_assist|nid=734|title=Eric Taylor 2|desc=|link=node|align=right|width=213|height=250]
Notice the space between "banana" and the beginning of the img_assist tag?
When I don't have a space, the URL for the image changes from:
http://interactive.wxxi.org/files/images/eric taylor ps2.medium.jpg
to
http://whatthetech.org/files/images/eric taylor ps2.medium.jpg
And I can make the change of adding and removing the space and it goes back and forth between the two... This seems like such a weird manifestation of a problem.
Any ideas why this would be happening... and if not, what would be your first step in tracking down the issue.
So weird. Thanks to anyone who was even willing to read this, let-alone suggest a solution.
-Andy.
Comments
Comment #1
dccircuit commentedAlso, for what it's worth, I'm aware of the poorly named "space in the filename" image files. I've been able to confirm that it will happen both with and without the spaces in the filename...
What doesn't seem the be the case however is that it happens with EVERY image... I've added and removed spaces before and after other images and it doesn't seem to be happening reliably with just any image.
Comment #2
sunHm. IA is just an input filter and outputs regular links, just like any other Drupal module. My first guess would be to check whether other modules, such as Multidomain, Domain Access, Organic Groups, aso. might cause this by redirecting to the other domain upon form submission.
Comment #3
dccircuit commentedI don't believe that I'm doing anything unusual with domain names and modules (I only have OG of the ones you mentioned and the problem was occurring before it was installed).
That other server name is not included anywhere in any of the configuration files for my site.
I'm beginning to believe that I have a misconfiguration at the networking level with the various identities of my servers.
It just seems strange to have it crop up only in this one spot and with such an odd-ball difference of a space before or after the brackets.
Comment #4
sunyes, all of that sounds odd. You might also want to check, which web server modules are enabled. For example, mod_security could be another cause for this.
However, I really can't imagine a chance that IA is the cause for this. Thus, marking as fixed. If you happen to find the cause for this issue, please let me know, so I can add an entry to the FAQ/Troubleshooting section in the README.txt.
Comment #5
sunForgot to mark this as fixed.
Comment #6
dgrant commentedI'm seeing this same issue. I have a test site running on localhost (also known as centurion). When I access the machine locally at http://localhost the image works, but when I access the machine from a different computer, using http://centurion instead, the image no longer works. Looking at the source of the web page, the image's src tag is http://localhost/... in both cases, which obviously fails when I am accessing centurion from another server.
Since dccircuit above could fix it by adding a space I figured I'd try the same thing. My img_assist tag is the very first thing in my post. Putting the word "banana" right in front of the tag fixed it. But putting banana in front and putting a space also fixed it. Then I tried putting a carriage return or many carriages returns in front of it and that fixes it too. If I remove all the carriage returns, it is broken again, as the link goes to http://localhost
Still not sure if this is a bug or something weird with our configurations. It could be apache's fault although why would putting some carriage returns in the body of the post (which get filtered out anyways by the filtered html input format) cause apache to do anything different?
Reopening, if you don't mind...
Comment #7
sunWhat happens if you access your site via http://centurion, visit http://centurion/img_assist/cache/clear, and check your nodes' output afterwards?
FYI: This is the regular expression that is used to replace the inline tags:
Don't be scared by the spaces - the
xmodifier sets the pattern to ignore whitespace unless it is noted literally (escaped).Comment #8
dgrant commentedsun, I also looked at that regex and was also wondering about the spaces. Then I looked up what the x option was for :-)
Clearing the cache fixes it! I thought it was maybe a cache issue, thanks a lot. So once this site is in production I will no longer have this issue. Is there a way to disable the img_assist cache? I usually leave all caching off while I am developing a site.
Comment #9
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #10
dccircuit commentedFor what it's worth, I believe this issue now had to do with an improperly configured apache server where a 2nd domain name was pointing at the same server, but it was not correctly defined in the httpd.conf file. Someone connecting to the server from the "other" less-frequently used domain name may have created a cached version of the image with the wrong filename in the URL. This is all just theory in my head about what might be going wrong...
But I know after I fixed the server to "expect" incoming requests from the other domain name, it stopped being a problem.