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.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

DataObjectManager : <% sprintf(....) %> displayed on the website


Go to End


48 Posts   13711 Views

Avatar
bunheng

Community Member, 78 Posts

15 October 2010 at 11:04pm

Hi,

I have the same problem, i saw the following code:

<% sprintf(_t('DataObjectManager.ADDITEM','Add %s',PR_MEDIUM,'Add [name]'),an Album) %>

in Albumn and Photos tab when I create new Image Gallery Page, is there any solution?

Looking forward to hearing from you son.

Thanks

Avatar
Chiasmata

Community Member, 5 Posts

16 October 2010 at 6:43pm

Hi bunheng

Did you try my solution from a couple of posts ago? - http://www.silverstripe.org/dataobjectmanager-module-forum/show/271514?start=32#post293190
It seems to work for most people.

The problem seems to come from either Xampp 1.7.3 configuration or PHP 5.3 itself. Can you please confirm whether you are using these?

Avatar
cake

Community Member, 19 Posts

19 October 2010 at 11:02pm

@Chiasmata: thank you very much. It works like a charm!

Avatar
bunheng

Community Member, 78 Posts

19 October 2010 at 11:10pm

Hi,

Thank you, it works for me now.

Bunheng

Avatar
Jamine

Community Member, 3 Posts

18 November 2010 at 5:22pm

Hello Chiasmata, replacing ereg_replace to preg_replace doesn't work for me..I already copy and paste your code but still the same.. hoping for your reply..thanks

Avatar
Jamine

Community Member, 3 Posts

19 November 2010 at 4:44pm

Edited: 19/11/2010 4:47pm

Hi just fixed the issue, here's my solution:

Edited the DOM:
1. dataobject_manager\templates\ImageDataObjectManager.ss line 6
2. dataobject_manager\templates\RelationDataObjectManager.ss line 6
3. dataobject_manager\templates\DataObjectManager.ss line 6

From:
<span class="uploadlink"><img src="dataobject_manager/images/add.png" alt="" /><% sprintf(_t('DataObjectManager.ADDITEM','Add %s',PR_MEDIUM,'Add [name]'),$AddTitle) %></span>

To:
<span class="uploadlink"><img src="dataobject_manager/images/add.png" alt="" /><% _t('DataObjectManager.ADD','Add') %>&nbsp;$AddTitle</span>

Avatar
Capt. Morgan

Community Member, 30 Posts

13 March 2011 at 2:24am

Thank you Jamine. Feels a lot better making these fixes in template files so that I can just override from mysite templates. I noticed this kind of fix is required on "<% sprintf(_t('DataObjectManager.NOITEMSFOUND','No %s found'),$PluralTitle) %>" in the same files too.

I'm having this issue on a Debian server with PHP 5.2.12 so it's not limited to wamp server.

Avatar
Sphere

Community Member, 46 Posts

20 October 2011 at 5:51am

I would really, really like SSViewer to stop using shorttags!

I should rewrite it all probably, but the shorttagging is a disaster on strict servers

Go to Top