Solution to: Images disappear when moving site to/from a subdirectory.

When making bigger maintaining changes on a Drupal site (like upgrading it) it's a common practice to make a copy of the whole site and database to a subdirectory (usualy on some other site) where everything can be done and tested before copying the result back to overwrite the live site.

How annoying is it then to discover that all the images disappear on the copy of the site when it goes into a subdirectory?

Well you could go and change all the image source paths to include the subdirectory. You could also do the same change by some nasty SQL hack, or make some rewriting trick in the .htaccess file. But then you'll have to change it back again when copying back to the live site! O_o

If you, like me, think, this can't be right, it's Drupal, there must be a better way.
Well you are correct. I have the solution for you ^_^

I found that there is two things that can cause this problem (or both at once):

1) Root reference in the image source path.
Look in the html source in your node editor. Perhaps you have written something like
<img src="/files/images/myimage.jpg" />
Well this is all good and sound on the main site, but when copied to a subdirectory the reference to root is becomming a problem. So just remove the root reference. You don't need it. Drupal knows the root. Change the above into this:

How to tell if a content-type is only viewable as admin

I have a cck field for a website. The view which pulls all the info is pulling the field and when I'm logged, I see the website listed with other content for a representative.

However, when I push live, the website field doesn't show. I've been through the field settings itself, the content-type, the view and all filters, no arguments and finally, the page that the view is displayed in.

Solution to: Frontpage goes "page not found" and menus disappear, after upgrading.

If you have this problem after opgrading, and if the error is only on the frontpage, and every other page is working fine and the menu is showing on them; so you basically just have this problem on the frontpage.

Then I have the solution for you! O_o

Product attributes fields reset upon change

Hi all,

Bit of a newbie question, but have set up a store which allows a user to enter size of a print and then upload an image, however if they go back an alter any of the attributes say 'hems' the upload field gets blanked.

Really not sure how to debug whether its an ajax issue / module conflict or what.

Can see what i mean here hopefully... http://www.signsofquality.co.uk/banners/economy-banner-feet

Thanks for any help.

Drew

Module that validates external links?

Is there a good bulk way to check if a listing of url's on a page (external) are still good? That is, at least resolving to a domain and not broken?

Years ago, there were sites that could do this but I can't find anything that does it in bulk via an upload of text/csv etc.

Content type nodes seem to disappear

Hi there,

All of the sudden, some about 300 nodes of certain content type seemed to disappeared. ¿?¿?¿?

Really weird because if I visit the url it's showing as a "not found" page ... however the paths and url aliases are still within the system (admin/build/path/list) and so is all the node data in the database, yet if I go to the content page at admin/content/node and filter by this content type I only see 6 nodes (of about 300 that are in the db) that were all created by user 1 (all the other nodes are created by anonymous users).

Could this be an attack?

Pages

Subscribe with RSS Subscribe to RSS - Drupal 6.x