Slideshow Satellite
[resolved] Cannot change Slide Title (6 posts)

  1. chrisHe
    Posted 3 years ago #

    Hi , it broke!
    installed v1.3.4 with WP3.5, seemed ok so gave "it Works" but now found cannot change a slide title. Error is:
    "Save a Slide
    Warning: stripslashes() expects parameter 1 to be string, array given in ...\wp-content\plugins\slideshow-satellite\models\slide.php on line 55"

    Can you help? a patch line(s) for the slide.php??


  2. cpres
    Plugin Author

    Posted 3 years ago #

    Woah, just saw this sorry for the delay!

    That's an interesting error you got there. What is the slide title that you're using? Perhaps that's what's breaking it?

    Any new info you can give after you've had some time with it?

  3. chrisHe
    Posted 3 years ago #

    Thanks for coming back to me - I like the slide display, so would hope to use it on our club site
    Still same issue - original slide title was imported as dsc0002.jpg, I tried to change the title to "Southport 24Hr race" (without quotes of course!)
    I have put a snapshot of the admin page on my own website and give you a link http://cp-software.co.uk/budworth/satellite_slide_title_error.png

    If you need more info, let me know...

  4. chrisHe
    Posted 3 years ago #

    I meanwhile attempted to work out the code and applied a "patch", hence the snapshot shows a later line number.
    I really don't want to hack core files, but leave it to you who understands what they are doing.
    I am pretty sure the issue is that when the form is submitted it's seeing an array, not a string, and this caused the validate function to trip over.
    if it helps at all, my work-patch is here:

    function validate($data = null) {
    		$this -> errors = array();
    		if (!empty($data)) {
    			$data = (empty($data[$this -> model])) ? $data : $data[$this -> model];
    			foreach ($data as $dkey => $dval) {
    	// addition: if a form is posted, $data is array[2]
    				if ( is_array($dval) ) {
    					foreach ($dval as $akey => $aval) {
    						$akey = stripslashes($aval);
    					extract($dval, EXTR_SKIP);
    	// end addition
    				$this -> data -> {$dkey} = stripslashes($dval);
  5. cpres
    Plugin Author

    Posted 3 years ago #

    You, my friend chrisHe, rock. That's exactly the fix that's needed :) Thanks!

  6. chrisHe
    Posted 3 years ago #

    @cpres Hi, thanks for that! Not 100% sure but I think same issue occurs in gallery.php as well as slide.php (function Validate() looks v similar!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Slideshow Satellite
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic