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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Upgrading SilverStripe /

Ask questions about upgrading SilverStripe to the latest version.

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

admin area looks strange and need always a refresh to function


Go to End


8 Posts   2338 Views

Avatar
wagnerma

Community Member, 12 Posts

4 March 2013 at 10:08am

I upgraded from silverstripe 2.4 to 3.0.5. At the beginning, all seems to work fine, after I upgraded my site like documented. At a certain point, my site seems to crash the admin area. The site is running fine, only the admin area isn't function. When you try to edit a page of the site you get wired text out put and the admin area stops working. Pressing the reload button, all is fine, I can edit the page, pressing save, the same picture. I need to reload. I took a screen shot of the wired text look.
Any idea?

Thanks for your help!

Marcel

Attached Files
Avatar
prwodux

Community Member, 7 Posts

26 June 2013 at 4:32pm

My admin area Pages section also like this. If click on any functionality nothing happens. When I refresh the page it will display. Any solutions?

Avatar
prwodux

Community Member, 7 Posts

27 June 2013 at 12:43am

Solved the issue.
Remove whitespace before an opening tag, or after a closing tag, in one of the project PHP files.(mysite/code/<php files>)

Avatar
mhdesign

Community Member, 216 Posts

28 June 2013 at 11:41am

This is EXACTLY the issue I'm trying to resolve (actually I've been trying for a couple of weeks)... I thought I was the only one having this problem!

I'm trying to add an editable sidebar to my site. I"m using the following Page.php which validates fine. However when I load it I get the same issue as you had. I've tried to re-key to remove any extra spaces -- now it crashes out my DB rebuild at SiteTree (Gah!). Frankly it's giving me the sh*ts -- SilverStripe is a great package but I'm a designer who can code -- not a developer. Plus while I can find my way around and cut and paste code, I can't write php functions from scratch...

So tell me -- which 'opening' and 'closing' tags are you referring to? The <?php and ?> tags? Or is it a spacing issue within?

Must you have a space before a {?
Do you not have a space before a (?
Can you see any issues with the attached?

Any advice appreciated...

<?php
class Page extends SiteTree {
	public static $db = array(
							  'SidebarHTML' => 'HTMLText'
							  );
	public static $has_one = array(
								   );
	function getCMSFields() {
		$fields = parent::getCMSFields();
		$fields = addFieldToTab("Root.Sidebar",new HTMLEditorField("SidebarHTML"));
		return $fields;
	}
}
class Page_Controller extends ContentController {
	public static $allowed_actions = array(
										   );
	public function init(); {
		parent::init();
	}
}

Avatar
mhdesign

Community Member, 216 Posts

28 June 2013 at 11:54am

Well that's progress -- went through code again. Not sure shat I did -- now I simply get an "Internal Server Error'?

Avatar
prwodux

Community Member, 7 Posts

28 June 2013 at 1:42pm

Hi arthurdent
Plaease check is there any space or new line before "<?php" or "<?" tag.
also check is there any space or new line after "?>" tag.

Avatar
mhdesign

Community Member, 216 Posts

28 June 2013 at 2:02pm

Edited: 28/06/2013 2:04pm

I've been advised that SilverStripe does not need a closing tag...

Looked at the server logs and found the error in my code (as confirmed on SS Forums) -- line 10 should be:

$fields -> addFieldToTab("Root.Sidebar",new HTMLEditorField("SidebarHTML"));

My bad...

Thanks for your comments -- can see the light at the end of the tunnel now!!

Avatar
prwodux

Community Member, 7 Posts

28 June 2013 at 3:43pm

If there is a closing tag there is no white space after that. Closing tag is not a must.