Site images broke when using internal pretty urls
Site images broke when using internal pretty urls
Running CMSMS .13 Canary
PHP version 4.3.11
MySQL version 4.0.25-standard
Images upload fine and display correctly in the image manager and on the root page (i.e. http://www.example.com/), but break as soon as you click a menu link and are sent to a new page (i.e. http://www.example.com/index.php/about).
After looking at the generated code it appears that the image source path is "uploads/images/image.jpg" so the server thinks the image is located in "index.php/about/uploads/images/image.jpg" which doesn't exist. I have been able to fix the problem by hard-coding the full url into the image source, but would like to not have to do that. Anyone know how I can fix this?
PHP version 4.3.11
MySQL version 4.0.25-standard
Images upload fine and display correctly in the image manager and on the root page (i.e. http://www.example.com/), but break as soon as you click a menu link and are sent to a new page (i.e. http://www.example.com/index.php/about).
After looking at the generated code it appears that the image source path is "uploads/images/image.jpg" so the server thinks the image is located in "index.php/about/uploads/images/image.jpg" which doesn't exist. I have been able to fix the problem by hard-coding the full url into the image source, but would like to not have to do that. Anyone know how I can fix this?
Last edited by crozi on Tue May 23, 2006 4:46 pm, edited 1 time in total.
Re: Site images broke when using internal pretty urls
Toss a {metadata} tag in your template(s) in the section. That'll add a base tag that will fix the problem.
Re: Site images broke when using internal pretty urls
Wow, thanks for the quick working solution! I thought I had put the {metadata} tag in my templates, but when I went back I had a tag in there instead, oops!
Re: Site images broke when using internal pretty urls
Hi - I was experiencing the same problem. Adding the {metadata} has only worked on one of my 3 templates - all the others are still not playing ball.
Also - I actually want to code the metadata to be in the template, nit the individual pages - so is there anyway to get around this other than ditching this latest version and goign back to one that I know can do the job?
Ta! Scotch
Also - I actually want to code the metadata to be in the template, nit the individual pages - so is there anyway to get around this other than ditching this latest version and goign back to one that I know can do the job?
Ta! Scotch
Re: Site images broke when using internal pretty urls
In the Admin console, Site Admin->Global Settings->Global Metadatascotch33 wrote:Also - I actually want to code the metadata to be in the template, nOt the individual pages
Re: Site images broke when using internal pretty urls
I installed cmsms 0.13 and do not get the inside pages. the {metadata} tags are already there in all the templates. I am using IIS on Windows XP and my PHP is 4.4.
For example -
http://localhost/lions/index.php/content_types
gives the error - page cannot be found!
if i type the following (without .php) into the browser -
http://localhost/lions/index.php?page=content_types
it works
what could be wrong here?
For example -
http://localhost/lions/index.php/content_types
gives the error - page cannot be found!
if i type the following (without .php) into the browser -
http://localhost/lions/index.php?page=content_types
it works
what could be wrong here?
Re: Site images broke when using internal pretty urls
if you upgraded the pretty url stuff is turned off by default you will need to edit the config.php file yourself...
- Elijah Lofgren
- Power Poster
- Posts: 811
- Joined: Mon Apr 24, 2006 1:01 am
Re: Site images broke when using internal pretty urls
The pretty URL scheme that was on by default doesn't work with IIS. This will be turned off by default in the next version of CMSMS.trident wrote: I installed cmsms 0.13 and do not get the inside pages. the {metadata} tags are already there in all the templates. I am using IIS on Windows XP and my PHP is 4.4.
For example -
http://localhost/lions/index.php/content_types
gives the error - page cannot be found!
if i type the following (without .php) into the browser -
http://localhost/lions/index.php?page=content_types
it works
what could be wrong here?
Instructions for fix here:
http://forum.cmsmadesimple.org/index.ph ... l#msg30261
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. 

- Elijah Lofgren
- Power Poster
- Posts: 811
- Joined: Mon Apr 24, 2006 1:01 am
Re: Site images broke when using internal pretty urls
A pretty URL would look like:chechogr wrote: Could you explain me a little better what pretty URLs consists of?
I am building URLs like this:
http://www.mydomain.com/cmsmadesimple/i ... ccessories
All my pages are being built based on the page alias, wich in this case is Apparel-and-accessories
Can I build better URLs?
Thanks
Andy
http://www.example.com/cmsmadesimple/Ap ... cessories/
You can find out how to turn them on here: http://wiki.cmsmadesimple.org/index.php ... retty_URLs
Hope this helps,
Elijah
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. 

- Elijah Lofgren
- Power Poster
- Posts: 811
- Joined: Mon Apr 24, 2006 1:01 am
Re: Site images broke when using internal pretty urls
I think you can use the above code and place it in the root of your site but make sure to change "FOLDER" to the name of your folder. Also you need to put it in a file named ".htaccess" (without a file prefix) not "htaccess.txt"chechogr wrote: Should I just replace all the conent in the htaccess.txt file with this?:
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !\.
RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]
# Rewrites urls in the form of /parent/child/
# but only rewrites if the requested URL is not a file or directory
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.+)$ FOLDER/index.php?page=$1 [QSA]
and upload it into the root of my site or in the root of the folder where I installed CMSMS ?
Or instead you could copy the first set of code on this page:
http://wiki.cmsmadesimple.org/index.php ... retty_URLs
and put in in a .htaccess file in the folder where you install CMSMS
You shouldn't need that unless your server is running lighthttpd instead of Apache (you are very likely to be using Apache instead).chechogr wrote: where should this go?:
url.rewrite-final = (
"^/(admin)/(.*)$" => "/$1/$2",
"^/([^.?]*)$" => "/index.php?page=$1"
)
Hope this helps,
Elijah
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. 

- Elijah Lofgren
- Power Poster
- Posts: 811
- Joined: Mon Apr 24, 2006 1:01 am
Re: Site images broke when using internal pretty urls
In your .htaccess file try changing:chechogr wrote: I made a .htaccess file without the .txt and uploaded it into my site root with this content:
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !\.
RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]
# Rewrites urls in the form of /parent/child/
# but only rewrites if the requested URL is not a file or directory
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.+)$ cmcmadesimple/index.php?page=$1 [QSA]
I also made this changes in the config.php file:
#------------
#URL Settings
#------------
$config['assume_mod_rewrite'] = true;
$config['page_extension'] = '/';
$config['use_hierarchy'] = true;
then I inserted the {metadata} in all my templates between the {metadata}
and I am getting a 500 internal server error
What could be wrong?
cmcmadesimple
to:
cmsmadesimple
Hope this helps,
Elijah
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. 

Re: Site images broke when using internal pretty urls
I have the opposite problem, images are showing on the front end but not in the back end.
Re: Site images broke when using internal pretty urls
i had the same problems and a co-worker asked somebody here and they got a fix
in the global settings "Metadata" just add:
this fixed the problem and all images appeared again
in the global settings "Metadata" just add:
this fixed the problem and all images appeared again
Last edited by Jo Morg on Mon Nov 17, 2014 12:55 pm, edited 1 time in total.
Reason: removed hidden html
Reason: removed hidden html
patino-burch design
Anthony Patino-Burch
Anthony Patino-Burch
-
- Forum Members
- Posts: 127
- Joined: Fri Nov 28, 2008 10:28 pm
Re: Site images broke when using internal pretty urls
Thank you Tonypb. That's so amazing, it works, so simple. All my Photos and flash are back. Thanks again.
Re: Site images broke when using internal pretty urls
Nice thank you.Ted wrote: Toss a {metadata} tag in your template(s) in the section. That'll add a base tag that will fix the problem.
I use the section image tag/plugin:
{sectionimage lowercase=1 get_dimensions=1 levels=3 byname=1 image_path=img/producten extension="jpg"}
and had the same problem.
Using {metadata} solved the problem for me.