• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Site images broke when using internal pretty urls
PostPosted: Tue May 23, 2006 4:42 pm 
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?


Last edited by crozi on Tue May 23, 2006 4:46 pm, edited 1 time in total.

Top
  
 
 Post subject: Re: Site images broke when using internal pretty urls
PostPosted: Tue May 23, 2006 4:45 pm 
Offline
Administrator
Administrator
User avatar

Joined: Fri Jun 11, 2004 6:58 pm
Posts: 3334
Location: Fairless Hills, Pa USA
Toss a {metadata} tag in your template(s) in the section.  That'll add a base tag that will fix the problem.

_________________
http://about.me/tedkulp


Top
 Profile  
 
 Post subject: Re: Site images broke when using internal pretty urls
PostPosted: Tue May 23, 2006 4:52 pm 
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!


Top
  
 
 Post subject: Re: Site images broke when using internal pretty urls
PostPosted: Wed Jul 05, 2006 12:49 pm 
Offline
Power Poster
Power Poster

Joined: Tue Feb 14, 2006 9:56 pm
Posts: 250
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


Top
 Profile  
 
 Post subject: Re: Site images broke when using internal pretty urls
PostPosted: Sat Jul 08, 2006 5:59 pm 
Offline
Forum Members
Forum Members

Joined: Mon Jun 12, 2006 6:00 pm
Posts: 227
scotch33 wrote:
Also - I actually want to code the metadata to be in the template, nOt the individual pages


In the Admin console, Site Admin->Global Settings->Global Metadata

_________________
Mysql Dump - Backup and restore
Postgres Dump - Backup and restore


Top
 Profile  
 
 Post subject: Re: Site images broke when using internal pretty urls
PostPosted: Sat Jul 15, 2006 4:48 pm 
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?


Top
  
 
 Post subject: Re: Site images broke when using internal pretty urls
PostPosted: Sat Jul 15, 2006 5:17 pm 
Offline
Administrator
Administrator
User avatar

Joined: Thu Mar 09, 2006 5:32 am
Posts: 11812
Location: Arizona
if you upgraded the pretty url stuff is turned off by default you will need to edit the config.php file yourself...

_________________
Extensions » Modules/Tags click the name of the module/tag or Help to the right to get its parameters.
Right click and view source is a great way to see what you have to work with.
Check ver. CMSMS, PHP, server OS, in System Information page.
Default content http://multiintech.com/defaultcontent/
People are Wonderful
Business is Great
Life is Terrific
Ever wonder what happened to the Album module? Well it is alive and well.
http://album.multiintech.com/
Image


Top
 Profile  
 
 Post subject: Re: Site images broke when using internal pretty urls
PostPosted: Wed Jul 19, 2006 2:13 am 
Offline
Power Poster
Power Poster
User avatar

Joined: Mon Apr 24, 2006 1:01 am
Posts: 811
Location: Deatsville, AL
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?

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.
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. :)


Top
 Profile  
 
 Post subject: Re: Site images broke when using internal pretty urls
PostPosted: Wed Dec 20, 2006 7:18 am 
Offline
Power Poster
Power Poster
User avatar

Joined: Mon Apr 24, 2006 1:01 am
Posts: 811
Location: Deatsville, AL
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

A pretty URL would look like:
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. :)


Top
 Profile  
 
 Post subject: Re: Site images broke when using internal pretty urls
PostPosted: Wed Dec 20, 2006 2:58 pm 
Offline
Power Poster
Power Poster
User avatar

Joined: Mon Apr 24, 2006 1:01 am
Posts: 811
Location: Deatsville, AL
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 ?

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"

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


chechogr wrote:
where should this go?:

url.rewrite-final = (
  "^/(admin)/(.*)$" => "/$1/$2",
  "^/([^.?]*)$" => "/index.php?page=$1"
)

You shouldn't need that unless your server is running lighthttpd instead of Apache (you are very likely to be using Apache instead).


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. :)


Top
 Profile  
 
 Post subject: Re: Site images broke when using internal pretty urls
PostPosted: Wed Dec 20, 2006 7:28 pm 
Offline
Power Poster
Power Poster
User avatar

Joined: Mon Apr 24, 2006 1:01 am
Posts: 811
Location: Deatsville, AL
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 ^(.+)$ cm[color=green]cmadesimple[/color]/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?



In your .htaccess file try changing:
cm[color=green]cmadesimple[/color]
to:
cm[color=green]smadesimple[/color]

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. :)


Top
 Profile  
 
 Post subject: Re: Site images broke when using internal pretty urls
PostPosted: Mon Nov 12, 2007 5:47 pm 
I have the opposite problem, images are showing on the front end but not in the back end.


Top
  
 
 Post subject: Re: Site images broke when using internal pretty urls
PostPosted: Thu Feb 28, 2008 3:50 am 
Offline
Forum Members
Forum Members
User avatar

Joined: Tue Nov 20, 2007 12:16 am
Posts: 104
Location: Montgomery, Alabama
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

_________________
patino-burch design
Anthony Patino-Burch


Top
 Profile  
 
 Post subject: Re: Site images broke when using internal pretty urls
PostPosted: Thu Jan 01, 2009 3:32 pm 
Offline
Forum Members
Forum Members

Joined: Fri Nov 28, 2008 10:28 pm
Posts: 127
Thank you Tonypb.  That's so amazing, it works, so simple. All my Photos and flash are back. Thanks again.


Top
 Profile  
 
 Post subject: Re: Site images broke when using internal pretty urls
PostPosted: Tue Mar 24, 2009 2:49 pm 
Offline
Forum Members
Forum Members
User avatar

Joined: Fri Dec 01, 2006 9:56 pm
Posts: 66
Location: Netherlands
Ted wrote:
Toss a {metadata} tag in your template(s) in the section.  That'll add a base tag that will fix the problem.


Nice thank you.

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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
A2 Hosting