1259 Posts in 348 Topics by 484 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1015 Views |
-
Weird problem

21 June 2010 at 6:17pm
I just changed the theme to one which I developed and had these things showing up on the top of the page:
calls without an existing one // to avoid confusion when using the include in different contexts. // Entities without a namespace are deprecated, but widely used. $content = ereg_replace('<' . '% +_t\((\'([^\.\']*)\'|"([^\."]*)")(([^)]|\)[^ ]|\) +[^% ])*)\) +%' . '>', '
$MenuTitle.XML
calls without an existing one // to avoid confusion when using the include in different contexts. // Entities without a namespace are deprecated, but widely used. $content = ereg_replace('<' . '% +_t\((\'([^\.\']*)\'|"([^\."]*)")(([^)]|\)[^ ]|\) +[^% ])*)\) +%' . '>', '
Copyright © 20010
calls without an existing one // to avoid confusion when using the include in different contexts. // Entities without a namespace are deprecated, but widely used. $content = ereg_replace('<' . '% +_t\((\'([^\.\']*)\'|"([^\."]*)")(([^)]|\)[^ ]|\) +[^% ])*)\) +%' . '>', ' $Page(SidebarImages).Content
$TITLE
$MenuTitle.XML
$MenuTitle.XML
$MenuTitle.XML
CALENDAR
LINKS
$Page(SidebarLinks).Content
calls without an existing one // to avoid confusion when using the include in different contexts. // Entities without a namespace are deprecated, but widely used. $content = ereg_replace('<' . '% +_t\((\'([^\.\']*)\'|"([^\."]*)")(([^)]|\)[^ ]|\) +[^% ])*)\) +%' . '>', '
$BreadcrumbsHere are some visuals to help you picture it out:
View in a browser
Upclose
In the CMS
Hope someone is familiar and can help out. Thanks!
-
Re: Weird problem

19 August 2010 at 2:03pm
I too had this when using the Global Theme on SS 2.4 I have also had it on a dev site.
The problem seems to be this code in SSViewer.php
$content = file_get_contents(SSViewer::getTemplateFile($identifier));
// $content = "<!-- getTemplateContent() :: identifier: $identifier -->". $content;
// Adds an i18n namespace to all <% _t(...) %> calls without an existing one
// to avoid confusion when using the include in different contexts.
// Entities without a namespace are deprecated, but widely used.For some reason when choosing anything other than the default theme in the 2.4 admin the commented code is splatted all over the output. A temporary solution is to remove the commented code entirely.
Julian
-
Re: Weird problem

19 August 2010 at 2:07pm
I forgot to mention that I also got it over the freshly installed admin until the first refresh - then it went away. Very odd.
I was using apache fcgid at the time and have since changed back to mod_php where the page error occurs
-
Re: Weird problem

7 September 2010 at 3:36am Last edited: 7 September 2010 4:16am
My proposal for this problem (which also happend on my site running on gomain*go / PHP 5.2.11):
- has nothing to do with different themes,
- in sapphire/core/SSViewer.php you need to change the leading // of the command block starting at line 317 (V2.4.1) into something :...
/* $content = "<!-- getTemplateContent() :: identifier: $identifier -->". $content;
* Adds an i18n namespace to all <% _t(...) %> calls without an existing one
* to avoid confusion when using the include in different contexts.
* Entities without a namespace are deprecated, but widely used.
*/$content = ereg_replace('<' . '% +_t\((\'([^\.\']*)\'|"([^\."]*)")(([^)]|\)[^ ]|\) +[^% ])*)\) +%' . '>', '<?= _t(\''. $identifier . '.ss' . '.\\2\\3\'\\4) ?>', $content);
...looks like the <% %> symbols can't be mixed with comment blocks indicated by a leading //!
- I would like to ask silverstripe core developers, to change the code accordingly please.
- in addition, one might like to add the following into mysite/_config.php for a productive site:
// Director::set_environment_type('live');
error_reporting(E_ERROR);
ini_set('display_errors', '0');Anyone knows, how to configure PHP to prevent this behavior maybe?
| 1015 Views | ||
|
Page:
1
|
Go to Top |

