Quantcast
Channel: Adobe Community : Popular Discussions - Contribute
Viewing all articles
Browse latest Browse all 1458

Template Headaches (PHP includes & links getting rewritten)

$
0
0
I know this has been discussed a few times on these forums, but I've yet to find a solution.
I have several DW Templates that make use of PHP includes - some are relative ('includes/navigation.inc.php') some are absolute paths ('/home/smwc/public_html/includes/footer.inc.php'). Whenever a Contribute user saves a draft or sends a page for review these includes (which are OUTSIDE an editable region) get rewritten into relative paths.
For example:
The draft will get saved in domain.com/MMWIP/randomstring/randomstring.php
Code before the draft is saved will be:
<?php include('/home/smwc/public_html/includes/breadcrumb.inc.php'); ?>
Code after the draft is published will be:
<?php include('../../home/smwc/public_html/includes/breadcrumb.inc.php'); ?>
Obviously, that breaks everything.

It is also doing this to all absolute paths. Stylesheets go from src="/scripts/css/style.css" to src="../../scripts/css/style.css"; even the Template line gets changed to this <!-- InstanceBegin template="../../Templates/Index-Page.dwt.php" codeOutsideHTMLIsLocked="false" -->

Path links defined in the template (/about/index.php) get changed to ../about/index.php and so on..
I was a few weeks from a website launch... * sobs *
Can anyone help with this?

Viewing all articles
Browse latest Browse all 1458

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>