Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Customising the CMS /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

CMS Errors w/pic


Go to End


6 Posts   1589 Views

Avatar
Terry Apodaca

Community Member, 112 Posts

5 March 2010 at 11:16am

Ever since I upgraded to the latest version of Silverstripe...I get this error:

<% sprintf(_t('WELCOME1','Welcome to %s. Please choose on one of the entries in the left pane.'),SilverStripe CMS) %>
or
<% sprintf(_t('IMPORTSPECLINK', 'Show Specification for %s'),Property) %>

with my new Property Admin model admin. I have followed all tutorials and examples on building my own models, and have no idea why these are showing up this way now. Use to not!

Anyone have this problem or maybe know where i can fix it?

Avatar
MateuszU

Community Member, 89 Posts

5 March 2010 at 12:04pm

Edited: 05/03/2010 12:04pm

Works fine on vanilla 2.4. Can you tell me what's your exact version?

mat

Avatar
Terry Apodaca

Community Member, 112 Posts

5 March 2010 at 12:56pm

Version 2.3.6

I fixed it...but still should be noted some place. not sure this was just an oversight on an upgrade or something but I Had to change:

this:
<% sprintf(_t('WELCOME1','Welcome to %s. Please choose on one of the entries in the left pane.'),SilverStripe CMS) %>

to:
<% _t('WELCOMETO','Welcome to') %> $ApplicationName!
<% _t('CHOOSEPAGE','Please choose one of the tabs from the left.') %>

and similarly to the other error. i guess sprintf( is no longer needed/supported in the cms?

Avatar
MateuszU

Community Member, 89 Posts

5 March 2010 at 1:35pm

In version 2.3.6 the template you are mentioning looks as follows: http://open.silverstripe.org/browser/modules/cms/tags/2.3.6/templates/Includes/ModelAdmin_right.ss .

Here is the difference in your code that makes it broken:
Your code

<% sprintf(_t('WELCOME1','Welcome to %s. Please choose on one of the entries in the left pane.'),SilverStripe CMS) %> 

2.3.6

<% sprintf(_t('WELCOME1','Welcome to %s. Please choose on one of the entries in the left pane.'),$ApplicationName) %>

Would you mind saying where did you get the code from? SVN repo? Or downloaded as installer/tarball? Would be good to have it fixed.

mat

Avatar
Terry Apodaca

Community Member, 112 Posts

5 March 2010 at 2:23pm

I downloaded the tarball file (I did not use the installer) and simply extracted it to my server. It is for sure version 2.3.6. I got it right off the download page from silverstripe.org.

i removed the sprintf() and it works fine now.

Avatar
MateuszU

Community Member, 89 Posts

5 March 2010 at 2:28pm

Good to hear it works for you now. Just downloaded that file, and it has correct 2.3.6 code inside, so I don't know where the "SilverStripe CMS" came from in ur case.

Cheers,
mat