• I am getting this error when I try to display the weekly classroom schedule in a page using the shortcode [wcs]

    Warning: Illegal string offset ‘classroom’ in C:\xampp\htdocs\test2\wp-content\plugins\weekly-class-schedule\controllers\WcsOutputController.php on line 11

    Using the plugin with WordPress 3.6.1 with Twenty Twelve theme. Any ideas how to resolve this?

    http://wordpress.org/plugins/weekly-class-schedule/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Here’s my fix:

    Go into the code and file the file called WcsOutputController.php- it will be under wp-content/plugins/weekly-class-schedule/controllers/

    Next find this line of code (for me it’s line 11):

    $classroom = $attr['classroom'];

    And add a line above it and below it so it’s inside a condition loop that looks like this:

    if ( isset($attr['classroom']) && ! empty($attr['classroom']) ) {
            $classroom = $attr['classroom'];
    }

    Without digging too deep into the code on this plugin, I know this will work because it was basically trying to set a classroom value to a variable when there was no classroom value.

    That not right jonbenwaa!
    You may have noticed on the instructions they suggested you could set layout attribute like this: [wcs layout=horizontal].
    Therefore, [wcs layout=vertical] forces it to use the default vertical layout and happily removes the error message.

    It is true that using [wcs layout=vertical] instead of just [wcs] removes the classroom error. However, it still leaves “holes” in the schedule. I have a black background on the page so it’s really obvious that something is still wrong.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Getting Illegal string offset 'classroom' error’ is closed to new replies.