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.

DataObjectManager Module

Discuss the DataObjectManager module, and the related ImageGallery module.

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

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


Reply

48 Posts   8449 Views

Avatar
bunheng

15 October 2010 at 11:04pm Community Member, 78 Posts

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

16 October 2010 at 6:43pm Community Member, 5 Posts

Hi bunheng

Did you try my solution from a couple of posts ago? - [url]http://www.silverstripe.org/dataobjectmanager-module-forum/show/271514?start=32#post293190[/url]
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

19 October 2010 at 11:02pm Community Member, 19 Posts

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

Avatar
bunheng

19 October 2010 at 11:10pm Community Member, 78 Posts

Hi,

Thank you, it works for me now.

Bunheng

Avatar
Jamine

18 November 2010 at 5:22pm Community Member, 3 Posts

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

19 November 2010 at 4:44pm (Last edited: 19 November 2010 4:47pm), Community Member, 3 Posts

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

13 March 2011 at 2:24am Community Member, 30 Posts

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

20 October 2011 at 5:51am Community Member, 44 Posts

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