Uncaught SyntaxError: Unexpected token & on admin area
-
WordPress version: 3.5
WordPress SEO version: 1.3.4.1I did this: Activated the plugin
I expected the plugin to do this: Run smoothly
Instead it did this: Produced this error in the browser’s console:
Uncaught SyntaxError: Unexpected token &.I have disabled all other plugins and switched back to both twenty-eleven and twenty-twelve themes to test it. The error persists, but only when viewing the administration area. Here’s the problematic code section:
<script type="text/javascript"> //<![CDATA[ (function ($) { var wpseo_pointer_options = {"content":"<h3>Help improve WordPress SEO<\/h3><p>You've just installed WordPress SEO by Yoast. Please helps us improve it by allowing us to gather anonymous usage stats so we know which configurations, plugins and themes to test with.<\/p>","position":{"edge":"top","align":"center"}}, setup; wpseo_pointer_options = $.extend(wpseo_pointer_options, { buttons:function (event, t) { button = jQuery('<a id="pointer-close" style="margin-left:5px" class="button-secondary">' + 'Do not allow tracking' + '</a>'); button.bind('click.pointer', function () { t.element.pointer('close'); }); return button; }, close:function () { } }); setup = function () { $('#wpadminbar').pointer(wpseo_pointer_options).pointer('open'); jQuery('#pointer-close').after('<a id="pointer-primary" class="button-primary">' + 'Allow tracking' + '</a>'); jQuery('#pointer-primary').click(function () { document.location="http://server.com/site/wp-admin/admin.php?page=wpseo_dashboard&allow_tracking=yes&nonce=972bc26082"; }); Uncaught SyntaxError: Unexpected token & jQuery('#pointer-close').click(function () { document.location="http://server.com/site/wp-admin/admin.php?page=wpseo_dashboard&allow_tracking=no&nonce=972bc26082"; }); }; if (wpseo_pointer_options.position && wpseo_pointer_options.position.defer_loading) $(window).bind('load.wp-pointers', setup); else $(document).ready(setup); })(jQuery); //]]> </script>
The double quotes around the url get escaped for some reason, and they should not be esacaped.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Uncaught SyntaxError: Unexpected token & on admin area’ is closed to new replies.