Author Topic: img folder problems  (Read 1077 times)

llarsen

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
img folder problems
« on: May 15, 2009, 09:00:27 AM »
Hi, I've got CompactCMS installed and running fine, except for the img path.
I have installed in subfolder /cms/ and my .htaccess looks like this:

RewriteRule ^([^/]+)\.htm$ /cms/index.php?page=$1 [L]
RewriteRule ^print/([^/]+)\.htm$ /cms/afdrukken.php?page=$1 [L]
RewriteRule ^admin/includes/js/(.+\.js)$ /cms/admin/includes/combine.inc.php?type=javascript&files=$1 [L]
RewriteRule ^admin/img/styles/(.+\.css)$ /cms/admin/includes/combine.inc.php?type=css&files=$1 [L]
RewriteRule ^sitemap\.xml$ /cms/lib/sitemap.php [L]

When I set the img path in the config to just /img/ the editor works fine uploading images, but not showing them. To get them to show I have to edit the HTML by hand to "<img src="/cms/img/...".

If I change the config to /cms/img/ the editor creates a new directory in the wrong location.

Is it something about the path in the rewrite?

Xander

  • Developer
  • Administrator
  • Full Member
  • *****
  • Posts: 240
  • Karma: +5/-0
    • View Profile
    • CompactCMS.nl
Re: img folder problems
« Reply #1 on: May 15, 2009, 04:39:29 PM »
Hi Llarsen,

This error is not caused by wrong .htaccess file content. I think I have to admit you've found a bug... Luckily it is a small one, but still it has been a bit sloppy of me. For which I of course apologize. I'll put up a fixed archive soon (and SVN), but I guess the following should fix it:

Set the image path variable to "img/" (no starting /) and change the three lines below in the file /admin/includes/tiny_mce/plugins/tinybrowser/config_tinybrowser.php:

From:
Quote
$tinybrowser['path']['image'] = '../../../../..'.$cfg[img_path]; // Image files location
$tinybrowser['path']['media'] = '../../../../..'.$cfg[img_path].'media/'; // Media files location
$tinybrowser['path']['file']  = '../../../../..'.$cfg[img_path].'files/'; // Other files location

To:
Quote
$tinybrowser['path']['image'] = '../../../../../'.$cfg[img_path]; // Image files location
$tinybrowser['path']['media'] = '../../../../../'.$cfg[img_path].'media/'; // Media files location
$tinybrowser['path']['file']  = '../../../../../'.$cfg[img_path].'files/'; // Other files location

Which - in case not visible to the eye ;) - means adding an extra / before the variable.

If you could test this and report me whether it works, I would very much appreciate it. If you rather wait for the new archive (which also fixes IE8 compatibility issues), then expect the archive any time this evening.

Thanks!
Xander.
Don't ever hold back your suggestions. Help me either to improve CompactCMS or spread the word about it on sites such as Twitter, Digg, StumbleUpon, etc :). Thanks!

llarsen

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: img folder problems
« Reply #2 on: May 15, 2009, 09:58:14 PM »
The support for this system is really great and quick. Thanks!
If you post the new archive this evening, I'll wait for that since it include fixes for IE8... waiting...  :D

llarsen

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: img folder problems
« Reply #3 on: May 16, 2009, 12:29:11 AM »
While waiting I tried out the fix and it works fine, Thanks! I'd still like to see the IE8 fix though...

Xander

  • Developer
  • Administrator
  • Full Member
  • *****
  • Posts: 240
  • Karma: +5/-0
    • View Profile
    • CompactCMS.nl
Re: img folder problems
« Reply #4 on: May 16, 2009, 02:16:37 PM »
Hmmm.. The server change disabled my notifications for topics. So I just saw your message because of my natural curiousity ;). The archive is up (still 1.3.2 but new build). My TortoiseSVN program for updating the SVN is currently having some trouble with Google Code, so the SVN hasn't been updated yet.

If you want to update your CCMS installation for IE8 to work you'll need to replace the /admin/includes/tiny_mce/ directory.

Thanks for testing :)!
Xander.
Don't ever hold back your suggestions. Help me either to improve CompactCMS or spread the word about it on sites such as Twitter, Digg, StumbleUpon, etc :). Thanks!