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.

Data Model Questions /

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

DOM: Testimonials won't display


Go to End


3 Posts   2334 Views

Avatar
DanStephenson

Community Member, 116 Posts

17 March 2010 at 8:33pm

Hi all,

I have quite a weird error occurring. I'm building a Testimonials page, and based my code mostly on the DataObjectManager documentation, as I am using DOM to achieve this.

On my local development server, everything works fine, but when I upload TestimonialPage.php to the live server, I get the following error when I click on any link that loads the HomePage.php template.

The following error appears for just a moment, then redirects:

Redirecting to /~graycon/... (output started on /home/graycon/public_html/mysite/code/TestimonialPage.php, line 1)

If I go to one of my pages with the TestimonialPage type, all I see on the screen is SiteTree in black on a white background.

The only thing I can think of, is the ~ in my URL (for the client's server until we propagate the domain) is causing an error.

Attached are the Testimonial, TestimonialPage and HomePage PHP pages. If someone could have a look and see if they can figure out what's causing this, I'd be very appreciative because I am stuck.

Avatar
Hamish

Community Member, 712 Posts

17 March 2010 at 9:36pm

Looks like you have whitespace after the end of TestimonialPage.php. Remove the extra line, or better yet remove the closing ?> tag completely.

Avatar
DanStephenson

Community Member, 116 Posts

18 March 2010 at 7:11am

Hi Hamish,

I saw that too, removed the blank line (and also the closing PHP tag), and still get the same result.