21280 Posts in 5729 Topics by 2600 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 281 Views |
-
Specialcharacters in cms (3.0.2)

19 October 2012 at 12:30am
Hi all,
I get some weird special characters when opening a cms page. See attachement
I have already the latest update of Silverstripe (3.0.2) and FireBug has no Error in it.
-
Re: Specialcharacters in cms (3.0.2)

19 October 2012 at 11:03am
Hi!
This is the most strange thing I’ve ever seen with SilverStripe. These are not special characters, but escaped new lines (\n) and tabulators (\t). That could happen because the Ajax process responsible for updating of the CMS interface is not decoding the response, but I don’t have a clue about how to fix it.
Good luck!
Juan -
Re: Specialcharacters in cms (3.0.2)

19 October 2012 at 8:07pm Last edited: 19 October 2012 8:08pm
Yeah i've got the most strange error ever!
However, I found out it's in particular Pagetype. The code:
PhotoPagina.php:
class PhotoPagina extends Page {
public static $has_many = array(
'Fotos' => 'Photo'
);public function getCMSFields() {
$fields = parent::getCMSFields();
$gridFieldConfig = GridFieldConfig_RecordEditor::create();
$gridfield = new GridField("Fotos", "Fotos", $this->Fotos(), $gridFieldConfig);
$fields->addFieldToTab('Root.GalleryImages', $gridfield);return $fields;
}}
class PhotoPagina_Controller extends Page_Controller {public static $allowed_actions = array (
);public function init() {
parent::init();
Requirements::themedCSS('jquery-ui');
Requirements::themedCSS('fotoalbum');
Requirements::themedCSS('jquery-fancybox-1.2.6');
Requirements::JavaScript('http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js');
Requirements::JavaScript('themes/nkwa/javascript/fancybox/jquery.fancybox-1.2.6.pack.js');
Requirements::JavaScript('themes/nkwa/javascript/vendor/fotoalbum.js');
}
...
}Photo.php
class Photo extends DataObject {
static $db = array(
);
static $has_one = array(
'Plaatje' => 'Image',
'FotoPagina' => 'PhotoPagina'
);public function getCMSFields() {
$fields = parent::getCMSFields();
$fields->removeFieldFromTab("Root.Main","PhotoPaginaID");
return $fields;
}public static $summary_fields = array(
'ID' => 'ID',
'Thumbnail' => 'Thumbnail'
);public function getThumbnail() {
return $this->Image()->CMSThumbnail();
}
}I tried almost everything (by removing it) to fix it, but nothing did work out so far. I think it's something in the gridfieldconfig?
-
Re: Specialcharacters in cms (3.0.2)

19 October 2012 at 10:04pm
Have you tried removing all the JavaScript requirements in PhotoPagina.php?
-
Re: Specialcharacters in cms (3.0.2)

30 October 2012 at 12:48pm
Do you get any JS errors? Which browser? Does it happen on the default language (English US) as well?
Which SilverStripe release are you running?Can you please view the XHR/Ajax request in Chrome's developer tools "Network" panel,
right click on the entry, "save as HAR" and attach here? If its on a live server,
please either remove all cookie data from it, or email me privately to ingo at silverstripe dot com.
| 281 Views | ||
|
Page:
1
|
Go to Top |


