Page 1 of 1

[Solved] Template shows no content after 1.12.1 --> 2.1.1

Posted: Sun Jan 24, 2016 1:39 am
by pjb
[Solution: Problem caused by the pair of single quotation marks improperly place around a variable name on line 7 of the template]

Please help me to solve an issue in upgrading from 1.12.1 to 2.1.1.

I've attached the system info and the complete template.

After the upgrade, I can enter the admin page, and see that all of my content has transferred.

When I attempt to view the site, however, I get a blank page.

When I view source from the site's home page, all I see is:
<!DOCTYPE html>

Viewing the web console, I see the message:
The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol.

When I switch to another template just for testing purposes, content does appear without error, but the layout isn't something I can use.

So there's something amiss in the template, which I have included in full as an attachment.

I added line 5: {$maincontent=$maincontent scope=global};
line 7: {$mobileonly = "{content block = 'mobileonly'}" scope = global};
line 9: $mobiletemp=$mobiletemp scope=global};
and commented out line 6:
{*content block='mobileonly' assign='mobileonly' label='Mobile only Content'*}

in an attempt to follow the installation instructions concerning scope of variables differences in version 2.1.1

Please help me discover what I've done wrong.

Thank you,

Patrick

Re: [Solved] Template shows no content after 1.12.1 --> 2.1.

Posted: Mon Feb 15, 2016 5:58 am
by pcp20us
Hi. I am having the same problem testing 2.x as well, But cannot get any assitance. Did you fix this problem, as i see your post is marked as Solved??

Re: [Solved] Template shows no content after 1.12.1 --> 2.1.

Posted: Wed Feb 24, 2016 6:54 pm
by borutvel
"clear cache" is also the posible solution

Re: [Solved] Template shows no content after 1.12.1 --> 2.1.

Posted: Wed Feb 24, 2016 7:28 pm
by Rolf
Solution posted in the top of the first post

Re: [Solved] Template shows no content after 1.12.1 --> 2.1.

Posted: Wed Feb 24, 2016 7:32 pm
by borutvel
I've seen the solution in brackets at the top.

But I solved my exact same problem (blank page with only <!DOCTYPE html> in source) with "clear clear" about 30 minutes ago.