Weekly Class Schedule
Getting Illegal string offset 'classroom' error (4 posts)

  1. Noumaan Yaqoob
    Posted 2 years ago #

    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?


  2. jonbenwaa
    Posted 2 years ago #

    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.

  3. jillc
    Posted 2 years ago #

    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.

  4. AthleteHI
    Posted 2 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Weekly Class Schedule
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.