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.

All other Modules /

Discuss all other Modules here.

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

jQuery Slide module show causing errors in admin


Go to End


9 Posts   3104 Views

Avatar
babbler

Community Member, 4 Posts

12 March 2012 at 3:39pm

Hi
I'm not very experienced with SilverStripe having inherited the site from a previous developer so please forgive the noobyness.

I have installed the jQuery Slideshow module which works fine on some pages but causes other pages to give the following error when selected for editing i the admin page.

"Unknown column 'HomePage.ID' in 'where clause'
IN POST /admin/getitem?ID=1&ajax=1
Line 525 in /home/soundsma/public_html/sapphire/core/model/MySQLDatabase.php"

This is preceded by a query string.

In _config.php I have:

"//enable slideshow on all pages
DataObject::add_extension('Page', 'Slideshow');"

If I comment out the above, the errors vanish.

The other thing I notice is that the error occurs on pages that dont use mysite/code/Page.php but I'm not sure how this relates to the 'Page' parameter in the above. They have their own files eg: mysite/code/Project.php and mysite/code/Homepage.php

I'm just guessing beyond here so any help would be much appreciated.

many thanks

Avatar
Lexandclo

Community Member, 55 Posts

13 March 2012 at 12:06am

Hi

Looks like your calling the Slideshow to a HomePage,

Try adding this

//enable slideshow on all Homepage
DataObject::add_extension('HomePage', 'Slideshow');

Let Me Know

Darren

Avatar
babbler

Community Member, 4 Posts

13 March 2012 at 10:47am

Thanks for the suggestion.
I now have this in _config.php:

//enable slideshow on all pages
DataObject::add_extension('Page', 'Slideshow');
//enable slideshow on all Homepage
DataObject::add_extension('HomePage', 'Slideshow');

Is that what you meant?

I still get the error though :(

Avatar
Lexandclo

Community Member, 55 Posts

15 March 2012 at 1:34am

Hi

Did you run dev/build when you put the Slide Show in your root dir,

plus did you run it again when you changed the config?

Darren

Avatar
babbler

Community Member, 4 Posts

15 March 2012 at 3:15pm

Hi
That pesky dev/build again! I do forget it sometimes but this time it made no difference I'm afraid.
I still get an error when I try to edit the homepage in admin.
On other pages that use Page.ss the slideshow works fine, it appears to be a problem on pages that dont use Page.ss such as HomePage.ss. This may not be related but it is my observation.

I have attached a txt file with the whole error message in the hope that it might mean something to you.

Again, many thanks for your help, your time is much appreciated.

Avatar
Lexandclo

Community Member, 55 Posts

16 March 2012 at 1:33am

Hi

Can you explain to me how you created the homepage.ss?
and you set it up?

Darren

Avatar
babbler

Community Member, 4 Posts

16 March 2012 at 9:53am

Hi
I inherited the site from the developer who built it so I didn't personally create any of the pages.
Maybe if you can tell me what I need to check I could have a look.

Alternatively would it make sense for me to set up ftp access for you so you can have a look yourself.

Many thanks for your time, its much appreciated.

Mouli

Avatar
Lexandclo

Community Member, 55 Posts

16 March 2012 at 10:35pm

Edited: 16/03/2012 10:36pm

Hi

If you like send ftp to darren at lexandclo dot co dot uk.( in email form!)

and ill take a look for you

Darren

Go to Top