Forum

Thread tagged as: Question, Problem, Error

links in template outputting as .html instead of .php

In some of my templates, I have a relative link to a booking page. The link is ...booking.php but when the page is viewed in the browser and the link clicked, it sends me to booking.html and a 404 error.

Template code:

<perch:if exists="clinic1_bookings"><perch:content id="clinic1_bookings" type="textarea" label="Clinic 1 Bookings Text" help="OPTIONAL FIELD. An optional field allowing extra info to be added if necessary. No problem to leave blank." markdown editor="simplemde" html="true"></perch:if>
                                            <ul class="button-nav pill">
                                                <li>
                                                    <button class="bkg-green-light bkg-hover-tdc-red color-white color-hover-white medium">
                                                        <span class="icon-old-phone small"></span>
                                                        <a href="tel:+33685880591">Call Us</a>
                                                    </button>
                                                </li>
                                                <li>
                                                    <button class="bkg-blue-light bkg-hover-tdc-red color-white color-hover-white medium">
                                                        <span class="icon-credit-card small"></span>
                                                        <a href="../contact/booking.php">Book Online</a>
                                                    </button>
                                                </li>
                                            </ul>

Safari Source Code for the same section:


<ul class="button-nav pill"> <li> <button class="bkg-green-light bkg-hover-tdc-red color-white color-hover-white medium"> <span class="icon-old-phone small"></span> <a href="tel:+33615553156">Call Us</a> </button> </li> <li> <button class="bkg-blue-light bkg-hover-tdc-red color-white color-hover-white medium"> <span class="icon-credit-card small"></span> <a href="../contact/booking.html">Book Online</a> </button> </li> </ul>

Any help gratefully received.

Many thanks

Diagnostics:

Health check

 Perch is out of date. You are running Perch 3.1.2 and the latest is 3.1.3. Update instructions
 PHP 5.6.30 is up to date
 MySQL 5.6.32-78.1 is up to date
 Image processing available
Summary information

Perch: 3.1.2, PHP: 5.6.30, MySQL: 5.6.32-78.1, with PDO
Server OS: Linux, cgi-fcgi
Installed apps: content (3.1.2), assets (3.1.2), categories (3.1.2), perch_forms (1.12)
App runtimes: <?php $apps_list = [ 'perch_forms' ];
PERCH_LOGINPATH: /perch
PERCH_PATH: /home1/silverpe/websites/tdc-website/perch
PERCH_CORE: /home1/silverpe/websites/tdc-website/perch/core
PERCH_RESFILEPATH: /home1/silverpe/websites/tdc-website/perch/resources
Image manipulation: GD Imagick
PHP limits: Max upload 64M, Max POST 64M, Memory: 256M, Total max file upload: 64M
F1: 3b606135b33e6a102526838f4152a807
Resource folder writeable: Yes
DOCUMENT_ROOT: /home1/silverpe/websites/tdc-website
HTTP_HOST: www.tdcski.com
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
Ben Langridge

Ben Langridge 0 points

  • 2 years ago

Ben, I would say you have a cashe issue or something like that. Perch will not make changes to your code which you haven’t explicitly written into it.

Maybe your modifying the wrong template or haven’t saved the region again after making changes to the template.

It may be time to turn on debug and see what the debug output is showing about which template it’s using. It’s an easy thing to miss, so debug is your best option to troubleshoot something like this.