Relative path problem with 1.11.2

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
sercotec
Forum Members
Forum Members
Posts: 16
Joined: Wed Jan 30, 2008 1:17 pm

Relative path problem with 1.11.2

Post by sercotec »

i have upgraded from 1.9.4 to 1.11.2 (deleted all files db remained same then upgraded)

first i had some issues with image paths but {metadata} solved that, but now there is another issue with css and js files paths.

Not in main page but in the other pages:

http://www.sercotec.net/hakkimizda/
if you check the code:

script language="javascript" type="text/javascript" src="assets/js/jquery.js"

this path is not reachable unless i make the path "../../assets/js/jquery.js

this is something i can handle but i use "gallery" and it writes its own code and i cant change its css and js file locations.

(i turned off and on hierarchy in config.php nothing changed)

Any ideas ?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Relative path problem with 1.11.2

Post by Dr.CSS »

Why aren't you using the uploads/ folder for these 'assets'..?
sercotec
Forum Members
Forum Members
Posts: 16
Joined: Wed Jan 30, 2008 1:17 pm

Re: Relative path problem with 1.11.2

Post by sercotec »

its not the case but using assets/images folder for design prevents your images used for design accidentally deleted by user.


the case is even i manage the paths for my code, an addon like "gallery" inserts its own code and the inserted code unfortunately do not point where javascript or css files are...
applejack
Power Poster
Power Poster
Posts: 1014
Joined: Fri Mar 30, 2007 2:28 am

Re: Relative path problem with 1.11.2

Post by applejack »

Have you tried src="/assets/js/jquery.js"
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: Relative path problem with 1.11.2

Post by velden »

I do believe those script files are not present at all on your server. When I look at my own sites with Gallery installed I can at least open

"http://www.example.com/modules/Gallery/ ... ox.pack.js

In your case that's not possible. I think you should look into that first.

The

Code: Select all

<base href="http://www.sercotec.net/" />
makes those relative urls work.

Furthermore I think the use of {$root_url} before those relative links you control (not Gallery) would make them absolute. Of course a '/' links to the root also however when you develop a CMSMS website in a subdir of root (testing, previewing,...) you get in trouble using the '/'.
Last edited by Dr.CSS on Thu Oct 18, 2012 6:27 pm, edited 1 time in total.
Reason: Please use double quotes on fake links so they aren't clickable...
rooon
Forum Members
Forum Members
Posts: 113
Joined: Mon Dec 05, 2011 4:40 pm

Re: Relative path problem with 1.11.2

Post by rooon »

Hi,

Not the solution for your problem, but why not try

Code: Select all

<__script__ src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js?ver=1.5.2"></__script>
You can change 1.5.2 in the jQuery version you want :)

A good way to manage your files is images in uploads/images/ and other files in uploads/cms/
You can manage both in the admin panel of cmsms.

Have fun, Rooon
sercotec
Forum Members
Forum Members
Posts: 16
Joined: Wed Jan 30, 2008 1:17 pm

Re: Relative path problem with 1.11.2 [solved for the case]

Post by sercotec »

Thank you for your answers, i think its about the "Gallery" add-on because the path for js files were wrong i had to correct them manually from gallery > fancybox > templates. And the bigger problem is gallery module does not exract folders like fancybox , lightbox or slimbox they stay as .xml files uninstalled, so i have to copy these folders from a previous project.


In my case its solved but i guess Gallery module needs attention for the latest version of cmsms...
Post Reply

Return to “CMSMS Core”