7921 Posts in 1359 Topics by 933 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » Translation files missing in DOM since site move? Or ereg_replace error??
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 719 Views |
-
Translation files missing in DOM since site move? Or ereg_replace error??

7 March 2011 at 9:20am Last edited: 9 March 2011 7:41am
Hello
I tranfered my site from hosting A to hosting B.
Downloaded all the files from A.. uploaded them to B.
Also tranfered the db..dev/build as check..
Everything works, but it looks like some DOM translations are missing?
My website is set to dutch btw..In de Event_calender module:
the 'add dates' button is now rendered as:
<% sprintf(_t('DataObjectManager.ADDITEM','Add %s',PR_MEDIUM,'Add [name]'),a Date) %>Extended blog entry with Images via the DOM:
when empty:
<% sprintf(_t('DataObjectManager.NOITEMSFOUND','No %s found'),Fotos) %>Any idea why this is?
On my previous hosting it was displayed correctly! -
Re: Translation files missing in DOM since site move? Or ereg_replace error??

9 March 2011 at 7:40am
I think there is a problem with my new hosting..
When i click on my page blog (in the CMS) i get this pop-up with the a large error
ERROR [Warning]: ereg_replace() [<a href='function.ereg-replace'>function.ereg-replace</a>]: Ongeldig bereikeinde
IN POST /admin/getitem?ID=6&ajax=1
Line 97 in /home/vhosts/url.nl/httpdocs/sapphire/widgets/Widget.phpSource
======
88: }
89:
90: function CMSEditor() {
91: $output = '';
92: $fields = $this->getCMSFields();
93: foreach($fields as $field) {
94: $name = $field->Name();
95: $field->setValue($this->getField($name));
96: $renderedField = $field->FieldHolder();
* 97: $renderedField = ereg_replace("name=\"([A-Za-z0-9\-_]+)\"", "name=\"Widget[" . $this->ID .
"][\\1]\"", $renderedField);
98: $renderedField = ereg_replace("id=\"([A-Za-z0-9\-_]+)\"", "id=\"Widget[" . $this->ID .
"][\\1]\"", $renderedField);
99: $output .= $renderedField;
100: }
101: return $output;
102: }
103:Trace
=====
<ul>ereg_replace(name="([A-Za-z0-9\-_]+)",name="Widget[3][\1]",<div id="DisplayMode" class="field optionset "><label class="left" for="DisplayMode">Tonen door</label><div class="middleColumn"><ul id="DisplayMode" class="optionset ">
<li class="odd valmonth"><input id="DisplayMode_month" name="DisplayMode" type="radio" value="month" checked="checked" class="radio" /> <label for="DisplayMode_month">maand</label></li>
<li class="even valyear"><input id="DisplayMode_year" name="DisplayMode" type="radio" value="year" class="radio" /> <label for="DisplayMode_year">jaar</label></li>
</ul>
</div></div>)
line 97 of Widget.phpWidget->CMSEditor()
line 369 of ViewableData.phpViewableData->obj(CMSEditor,,,1)
line 446 of ViewableData.phpViewableData->XML_val(CMSEditor,,1)
line 27 of .cache.cms.templates.WidgetEditor.ssinclude(/home/vhosts/url.nl/httpdocs/silverstripe-cache/.cache.cms.templates.WidgetEditor.ss)
line 420 of SSViewer.phpSSViewer->process(ArchiveWidget)
line 342 of ViewableData.phpViewableData->renderWith(WidgetEditor)
line 87 of Widget.phpWidget->EditableSegment()
line 369 of ViewableData.phpViewableData->obj(EditableSegment,,,1)
line 446 of ViewableData.phpViewableData->XML_val(EditableSegment,,1)
line 125 of .cache.cms.templates.WidgetAreaEditor.ssinclude(/home/vhosts/url.nl/httpdocs/silverstripe-cache/.cache.cms.templates.WidgetAreaEditor.ss)
line 420 of SSViewer.phpSSViewer->process(WidgetAreaEditor)
line 342 of ViewableData.phpViewableData->renderWith(WidgetAreaEditor)
line 26 of WidgetAreaEditor.phpWidgetAreaEditor->FieldHolder()
line 369 of ViewableData.phpViewableData->obj(FieldHolder,,,1)
line 446 of ViewableData.phpViewableData->XML_val(FieldHolder,,1)
line 73 of .cache.sapphire.templates.TabSetFieldHolder.ssinclude(/home/vhosts/url.nl/httpdocs/silverstripe-cache/.cache.sapphire.templates.TabSetFieldHolder.ss)
line 420 of SSViewer.phpSSViewer->process(TabSet)
line 342 of ViewableData.phpViewableData->renderWith(TabSetFieldHolder)
line 80 of TabSet.phpTabSet->FieldHolder()
line 369 of ViewableData.phpViewableData->obj(FieldHolder,,,1)
line 446 of ViewableData.phpViewableData->XML_val(FieldHolder,,1)
line 58 of .cache.sapphire.templates.TabSetFieldHolder.ssinclude(/home/vhosts/url.nl/httpdocs/silverstripe-cache/.cache.sapphire.templates.TabSetFieldHolder.ss)
line 420 of SSViewer.phpSSViewer->process(TabSet)
line 342 of ViewableData.phpViewableData->renderWith(TabSetFieldHolder)
line 80 of TabSet.phpTabSet->FieldHolder()
line 369 of ViewableData.phpViewableData->obj(FieldHolder,,,1)
line 446 of ViewableData.phpViewableData->XML_val(FieldHolder,,1)
line 77 of .cache.sapphire.templates.Includes.Form.ssinclude(/home/vhosts/url.nl/httpdocs/silverstripe-cache/.cache.sapphire.templates.Includes.Form.ss)
line 420 of SSViewer.phpSSViewer->process(Form)
line 342 of ViewableData.phpViewableData->renderWith(Array)
line 1108 of Form.phpForm->forTemplate()
line 1135 of Form.phpForm->formHtmlContent()
line 391 of LeftAndMain.phpLeftAndMain->getitem(SS_HTTPRequest)
line 193 of Controller.phpController->handleAction(SS_HTTPRequest)
line 143 of RequestHandler.phpRequestHandler->handleRequest(SS_HTTPRequest)
line 147 of Controller.phpController->handleRequest(SS_HTTPRequest)
line 282 of Director.phpDirector::handleRequest(SS_HTTPRequest,Session)
line 125 of Director.phpDirector::direct(/admin/getitem)
line 127 of main.php</ul>
Any idea what is causing this problem??
-
Re: Translation files missing in DOM since site move? Or ereg_replace error??

9 March 2011 at 10:37am
Ok its starting to get complicated...
when i change saphire/widgets/widget.php
line 97 to:
$renderedField = str_replace("name=\"([A-Za-z0-9\-_]+)\"", "name=\"Widget[" . $this->ID . "][\\1]\"", $renderedField);
$renderedField = str_replace("id=\"([A-Za-z0-9\-_]+)\"", "id=\"Widget[" . $this->ID . "][\\1]\"", $renderedField);it show no errors anymore..
but when i try to add a link to a new featuredVideo widget in a new blog entry.. and presss save it doesn;t save the link!
When i check the page on the front-end it says:[Notice] Undefined variable: width
Source
60 break;
61 default:
62 $videoUrl = "";
63 }
64
65 $output = new DataObjectSet();
66
67 $output->push(new ArrayData(array(
68 "Url" => $videoUrl,
69 "Width" => $width,
70 "Height" => $height,
71 "YouTubeCode" => $videoID,
72 )));
73
74 return $output;but its not undefined..
something is going wrong big time.
Please i need your support, else i need to move my hosting..
-
Re: Translation files missing in DOM since site move? Or ereg_replace error??

9 August 2011 at 10:03pm
Did you ever find the problem? I'm having similar issues! Thanks
| 719 Views | ||
|
Page:
1
|
Go to Top |

