** SOLVED ** Code error when published using a masterframe

Issues related to previewing and publishing your web site.
Post Reply
bubblegumweb
 
 
Posts: 225
Joined: Sat May 30, 2015 7:15 am

** SOLVED ** Code error when published using a masterframe

Post by bubblegumweb »

Hi all,

I have created a small demo website using a masterframe. Within the masterframe header I have a small contact form. When the website is published I am getting the typical display of code at the top of the page which normally indicates that the page is in the wrong format ie: HTML when it should be PHP. The masterframe page is set at PHP but I am still getting the error code at the top of the page.

I have tried publishing the masterframe page with the settings (Don't publish this page) and (publish this page) but still getting the error code? I have cleared cache in my browser to test each version on the publish or not bit but can't get rid of this error code.
Any idea's please how to correct this.

Here is the demo website: https://www.visionwebdesign.co.uk/ironing/

Thanks
User avatar
Pablo
 
Posts: 22503
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Code error when published using a masterframe

Post by Pablo »

You will need to set the extension of the 'index' page to PHP.
https://www.visionwebdesign.co.uk/ironing/index.html
should be
https://www.visionwebdesign.co.uk/ironing/index.php
bubblegumweb
 
 
Posts: 225
Joined: Sat May 30, 2015 7:15 am

Re: Code error when published using a masterframe

Post by bubblegumweb »

Pablo, your a star. All is fine now. Thanks.
Jaywhy
 
 
Posts: 3
Joined: Tue Dec 22, 2015 4:20 pm

Re: Code error when published using a masterframe

Post by Jaywhy »

I have the same problem, the extension is already set to PHP. Any other ideas?
The page is www.blessedlandscapes.com
I also disabled 'Generate external JS file for page specific JavaScript' as Pablo suggested in a previous post.
User avatar
BaconFries
 
 
Posts: 5653
Joined: Thu Aug 16, 2007 7:32 pm

Re: Code error when published using a masterframe

Post by BaconFries »

It is more than likely that you have more than one index file on the server. Please ensure you do not have a .index.html along with a .index.php (remove the index.htmI) I also noticed that the index is set to index.js this indicates that the server is misconfigured. To resolve this either contact your host / server and ask them to fix it. Or Disable 'Generate external JS file for page specific JavaScript' in Tools -> Options -> HTML
Jaywhy
 
 
Posts: 3
Joined: Tue Dec 22, 2015 4:20 pm

Re: Code error when published using a masterframe

Post by Jaywhy »

Thanks for your reply. When I delete the index.html file the whole page is gone and it just shows the following coding:

$(document).ready(function()
{
$("a[href*='#header']").click(function(event)
{
event.preventDefault();
$('html, body').stop().animate({ scrollTop: $('#wb_header').offset().top }, 600, 'linear');
});
$("a[href*='#intro']").click(function(event)
{
event.preventDefault();
$('html, body').stop().animate({ scrollTop: $('#intro').offset().top }, 600, 'easeOutSine');
});
$("a[href*='#mosaic']").click(function(event)
{
event.preventDefault();
$('html, body').stop().animate({ scrollTop: $('#mosaic').offset().top }, 600, 'easeOutSine');
});
$("a[href*='#about']").click(function(event)
{
event.preventDefault();
$('html, body').stop().animate({ scrollTop: $('#about').offset().top }, 600, 'easeOutSine');
});
$("a[href*='#details']").click(function(event)
{
event.preventDefault();
$('html, body').stop().animate({ scrollTop: $('#details').offset().top }, 600, 'easeOutSine');
});
$("a[href*='#contact-title']").click(function(event)
{
event.preventDefault();
$('html, body').stop().animate({ scrollTop: $('#wb_contact-title').offset().top }, 600, 'easeOutSine');
});
$(document).on('click','.ThemeableMenu1-navbar-collapse.in',function(e)
{
if ($(e.target).is('a') && ($(e.target).attr('class') != 'dropdown-toggle'))
{
$(this).collapse('hide');
}
});
});

Also, I already have disabled 'Generate external JS file for page specific JavaScript' in Tools -> Options -> HTML.
And I talked to the host and they said that the problem is on the coding not on index.js

Any other ideas are very much welcome!
User avatar
Pablo
 
Posts: 22503
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Code error when published using a masterframe

Post by Pablo »

The problem is with the configuration of the server. The server should not use index.js as the landing page.

To work around this issue you will need to:
- remove index.js from the server.
- make sure JavaScript is embed in the page: Disable 'Generate external JS file for page specific JavaScript' in Tools -> Options -> HTML
Jaywhy
 
 
Posts: 3
Joined: Tue Dec 22, 2015 4:20 pm

Re: Code error when published using a masterframe

Post by Jaywhy »

Thank you, Pablo and Baconfries! The problem is solved. :D
Post Reply