Title: Syntax Error
Last modified: August 21, 2016

---

# Syntax Error

 *  Resolved [EvilJeff](https://wordpress.org/support/users/eviljeff/)
 * (@eviljeff)
 * [12 years ago](https://wordpress.org/support/topic/syntax-error-82/)
 * Hi,
 * Thank you for this fantastic plugin.
 * I get this error from the console:
 * `SyntaxError: missing ; before statement
    var tw_-1 = null;
 * Can you please assist?
    Thank you
 * [https://wordpress.org/plugins/testimonials-widget/](https://wordpress.org/plugins/testimonials-widget/)

Viewing 13 replies - 1 through 13 (of 13 total)

 *  Thread Starter [EvilJeff](https://wordpress.org/support/users/eviljeff/)
 * (@eviljeff)
 * [12 years ago](https://wordpress.org/support/topic/syntax-error-82/#post-4870854)
 * I’ll explain further. I have installed the plugin and added several testimonials.
   When the page loads, one testimonial shows but then I get the Syntax error.
 * I hope you can help.
    Thank you
 *  Plugin Contributor [Michael Cannon](https://wordpress.org/support/users/comprock/)
 * (@comprock)
 * [12 years ago](https://wordpress.org/support/topic/syntax-error-82/#post-4870996)
 * This is a JavaScript error. First of it’s kind that I’ve heard of.
 * Please view the debug FAQ entry and report back your results.
 *  Thread Starter [EvilJeff](https://wordpress.org/support/users/eviljeff/)
 * (@eviljeff)
 * [12 years ago](https://wordpress.org/support/topic/syntax-error-82/#post-4871008)
 * Here is what I get
 * Deprecated: Assigning the return value of new by reference is deprecated in /
   home/clientap/public_html/dpr-preview2/wp-content/plugins/envato-wordpress-toolkit-
   master/index.php on line 207
 * And on the sidebar where the testimonial is I get this
    Notice: Undefined variable:
   echo in /home/clientap/public_html/dpr-preview2/wp-content/plugins/widget-shortcode/
   init.php on line 75
 * Thank you
 *  Thread Starter [EvilJeff](https://wordpress.org/support/users/eviljeff/)
 * (@eviljeff)
 * [12 years ago](https://wordpress.org/support/topic/syntax-error-82/#post-4871009)
 * Here is the link to the site
 * [http://dpr-preview2.clientapproval.co.uk/](http://dpr-preview2.clientapproval.co.uk/)
 * thanks
 *  Plugin Contributor [Michael Cannon](https://wordpress.org/support/users/comprock/)
 * (@comprock)
 * [12 years ago](https://wordpress.org/support/topic/syntax-error-82/#post-4871051)
 * Did you confirm that this isn’t a theme issue per the debug FAQ entry?
 *  Thread Starter [EvilJeff](https://wordpress.org/support/users/eviljeff/)
 * (@eviljeff)
 * [12 years ago](https://wordpress.org/support/topic/syntax-error-82/#post-4871123)
 * How can I confirm that? The syntax error appears at the bottom of the html page
   inside
 *     ```
       <script type="text/javascript">
       var tw_-1 = null;
       jQuery(document).ready(function() {
       tw_-1 = jQuery('.testimonials-widget-testimonials-1').bxSlider({
       auto: true,
       autoControls: true,
       autoHover: true,
       controls: false,
       mode: 'fade',
       pager: false,
       pause: 5000,
       video: false,
       slideMargin: 2
       });
       });
       </script>
       ```
   
 * on the first line `var tw_-1 = null;`.
 * That is the code for the testimonials slider so I guess the error is within the
   testimonial plugin? Or am I misunderstanding something?
 * Thanks
 *  Plugin Contributor [Michael Cannon](https://wordpress.org/support/users/comprock/)
 * (@comprock)
 * [12 years ago](https://wordpress.org/support/topic/syntax-error-82/#post-4871129)
 * Ah, sorry, are you using a shortcode or the widget instance?
 * The problem is that the `-1` is coming through as the widget instance. Considering
   that in the code, they start at `0` and increment, than decrement, I think there’s
   something in your implementation that’s mucking things up.
 * If you’re using a `widget_number` in your shortcode, please remove it.
 *  Thread Starter [EvilJeff](https://wordpress.org/support/users/eviljeff/)
 * (@eviljeff)
 * [12 years ago](https://wordpress.org/support/topic/syntax-error-82/#post-4871130)
 * I’m using the widget instance, not using a shortcode. I wish I was though!
 *  Plugin Contributor [Michael Cannon](https://wordpress.org/support/users/comprock/)
 * (@comprock)
 * [12 years ago](https://wordpress.org/support/topic/syntax-error-82/#post-4871131)
 * Please see the FAQ for resetting testimonials.
 *  Thread Starter [EvilJeff](https://wordpress.org/support/users/eviljeff/)
 * (@eviljeff)
 * [12 years ago](https://wordpress.org/support/topic/syntax-error-82/#post-4871132)
 * I did that, no luck. I still get the same error. This is so frustrating. I would
   consider using a different plugin as your one might go in conflict with the theme
   but I can’t find any other better than this one. Have you got any other suggestion?
   Thank you
 *  Plugin Contributor [Michael Cannon](https://wordpress.org/support/users/comprock/)
 * (@comprock)
 * [12 years ago](https://wordpress.org/support/topic/syntax-error-82/#post-4871134)
 * Have you performed the common debugging steps per the FAQ? Things like changing
   theme and disabling other plugins.
 *  Thread Starter [EvilJeff](https://wordpress.org/support/users/eviljeff/)
 * (@eviljeff)
 * [12 years ago](https://wordpress.org/support/topic/syntax-error-82/#post-4871139)
 * I have performed the common debugging but still no luck. I have opted for a different
   plugin and it’s all fine now. Thank you for your support
 *  Plugin Contributor [Michael Cannon](https://wordpress.org/support/users/comprock/)
 * (@comprock)
 * [12 years ago](https://wordpress.org/support/topic/syntax-error-82/#post-4871140)
 * Understood, sorry for the trouble. Curious to know why the decrement…

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Syntax Error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/testimonials-widget_c56561.svg)
 * [Testimonials Widget](https://wordpress.org/plugins/testimonials-widget/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/testimonials-widget/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/testimonials-widget/)
 * [Active Topics](https://wordpress.org/support/plugin/testimonials-widget/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/testimonials-widget/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/testimonials-widget/reviews/)

 * 13 replies
 * 2 participants
 * Last reply from: [Michael Cannon](https://wordpress.org/support/users/comprock/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/syntax-error-82/#post-4871140)
 * Status: resolved