Error in Google Tag Manager - The workspace has the following errors - google-tag-manager

I'm getting the following error when I try to publish it:
<script> (function(ss,ex){ window.ldfdr=window.ldfdr||function(){(ldfdr._q=ldfdr._q||[]).push([].slice.call(arguments));}; (function(d,s){ fs=d.getElementsByTagName(s)[0]; function ce(src){ var cs=d.createElement(s); cs.src=src; cs.async=1; fs.parentNode.insertBefore(cs,fs); }; ce(‘https://sc.lfeeder.com/lftracker_v1_'+ss+(ex?'_'+ex:'')+'.js’); })(document,‘script’); })(‘kn9Eq4Ryyqj7RlvP’); </script>
I haven't tried anything as I don't know what to do

It is the error when copy from some document. The symbol ' will become ‘ or ’
You need to change all the ‘ ’ to '.
<script> (function(ss,ex){ window.ldfdr=window.ldfdr||function(){(ldfdr._q=ldfdr._q||[]).push([].slice.call(arguments));}; (function(d,s){ fs=d.getElementsByTagName(s)[0]; function ce(src){ var cs=d.createElement(s); cs.src=src; cs.async=1; fs.parentNode.insertBefore(cs,fs); }; ce('https://sc.lfeeder.com/lftracker_v1_'+ss+(ex?'_'+ex:'')+'.js'); })(document,'script'); })('kn9Eq4Ryyqj7RlvP'); </script>

Related

How to paste multi line code in Meteor shell

When I paste a multi line code like
const f = () => {
console.log("Hello");
};
in Meteor shell, it seems to be that every line is executed. I get this Error:
};
^
Uncaught SyntaxError: Unexpected token '}'
Is there a chance to paste multi line code in Meteor shell? It would be helpful in order to try out some code snippets.

How to add a background image inline style to link tag Rails

I just can't seem to get this right.
In my rails app I am using ActionCable, it has issues with sending over URLs in partials. To fix this I am going to let the CSS do the work of setting the image, only to allow the image to be set dynamically I am going to need to have access to the view hence the fact this has to be inline css.
.message
%a.message_profile-pic{ :href => "", {:style=>"background-image:url('avatar.png')" } }
I have an image called avatar.png in my app/assets/images directory just as a test. It's an empty a-tag for now but it will become a link_to once I sort out the profile sections of the app.
I am getting the following error:
SyntaxError - syntax error, unexpected ')', expecting =>
...nd-image:url('avatar.png')" } )}></a>\n #{
How do I set this? I am using Rails 5 rc1 and Ruby 2.3 with bootstrap.
Note:
I have also tried the new HAML syntax with the same result:
%a.message_profile-pic{ :href => "", style: {background-image: "url('avatar.png')"}}
Edit
Here is what better errors is showing me:
Full stack trace looks like this:
SyntaxError - syntax error, unexpected ')', expecting =>
...nd-image:url('avatar.png')" } )}></a>\n #{
... ^
/Users/ruberto/Personal/Projects/splat/app/views/messages/_message.html.haml:6: unknown regexp option - a
/Users/ruberto/Personal/Projects/splat/app/views/messages/_message.html.haml:6: syntax error, unexpected $undefined
));}\n </a>\n <span class='message_timestamp'>\n #{
^
/Users/ruberto/Personal/Projects/splat/app/views/messages/_message.html.haml:6: syntax error, unexpected keyword_class, expecting keyword_do or '{' or '('
));}\n </a>\n <span class='message_timestamp'>\n #{
^
/Users/ruberto/Personal/Projects/splat/app/views/messages/_message.html.haml:6: syntax error, unexpected $undefined
));}\n </a>\n <span class='message_timestamp'>\n #{
^
/Users/ruberto/Personal/Projects/splat/app/views/messages/_message.html.haml:8: syntax error, unexpected '}', expecting tSTRING_DEND
));}\n </span>\n <span class='m...
^
/Users/ruberto/Personal/Projects/splat/app/views/messages/_message.html.haml:8: unknown regexp options - pa
/Users/ruberto/Personal/Projects/splat/app/views/messages/_message.html.haml:8: syntax error, unexpected $undefined
...n class='message_star'></span>\n <span class='message_conte...
... ^
/Users/ruberto/Personal/Projects/splat/app/views/messages/_message.html.haml:8: syntax error, unexpected keyword_class, expecting keyword_do or '{' or '('
...ge_star'></span>\n <span class='message_content'>\n #{
... ^
/Users/ruberto/Personal/Projects/splat/app/views/messages/_message.html.haml:8: syntax error, unexpected $undefined
...<span class='message_content'>\n #{
... ^
/Users/ruberto/Personal/Projects/splat/app/views/messages/_message.html.haml:11: syntax error, unexpected '}', expecting tSTRING_DEND
));}\n </span>\n</div>\n", -2, f...
^
/Users/ruberto/Personal/Projects/splat/app/views/messages/_message.html.haml:11: unknown regexp options - dv
/Users/ruberto/Personal/Projects/splat/app/views/messages/_message.html.haml:11: syntax error, unexpected $undefined
));}\n </span>\n</div>\n", -2, false);::Haml::Util.h...
^
/Users/ruberto/Personal/Projects/splat/app/views/messages/_message.html.haml:11: unterminated string meets end of file
/Users/ruberto/Personal/Projects/splat/app/views/messages/_message.html.haml:11: syntax error, unexpected end-of-input, expecting tSTRING_DEND:
You can do something like this:
:style => "background-image: url(#{image_path "avatar.png"})"
To find more about image_path.

grunt.util.spawn NOT working on Windows

var child = grunt.util.spawn({
cmd: 'echo %PATH%'
}, function(error, result, code) {
cb(error, result.stdout);
});
When I executed 'echo %PATH%' in my windows command prompt, it works fine.
But grunt.util.spawn is producing error like this:
>>Error: Error: not found: echo %PATH%
Tried googling over an hour, but no luck. Please help me.
I think you need "%PATH%" to be passed as an argument like this:
var child = grunt.util.spawn({
cmd: 'echo',
args: ['%PATH%'],
}, function(error, result, code) {
cb(error, result.stdout);
});

How to create a file by registerMultiTask (gruntjs)

I want gruntjs to create a file on each build that contains some PHP code to define a version number.
the following code fragments are in my grunt.initConfig:
1st some meta
meta: {
versionfile: '<?php \n' +
'define(\'VERSION\', \'<%= grunt.template.today("yyyymmddhhii") =%>\'); \n' +
'?>'
}
2nd the configuration
versionfile: {
'lib/define-version.php': '<%= meta.versionfile %>'
}
and then the multitask definition
grunt.registerMultiTask('versionfile', 'create version file.', function() {
grunt.file.write(this.target, this.data);
});
when I run the job the following error comes up and the file is not written:
Running "versionfile:lib/define-version.php" (versionfile) task
Warning: An error occurred while processing a template (Unexpected token )). Use --force to continue.
I am thankful for every hint on what exactly this error means.
Maybe there is another way to write a file containing the php-code?
I found the error. The correct configuration has a = too much.
Instead of
'define(\'VERSION\', \'<%= grunt.template.today("yyyymmddhhii") =%>\'); \n' +
it must be
'define(\'VERSION\', \'<%= grunt.template.today("yyyymmddhhMM") %>\'); \n' +
(ignore the ii>MM, that's just another error ;)

iframe Onload Visibility

I am trying to hide an iframe until it is loaded by I keep getting an error with the following code:
jquery("some stuff">.html("<iframe frameborder='0' vspace='0' hspace='0' marginwidth='0'
allowtransparency='true' scrolling='no' marginheight='0'
style='visibility:hidden;' onload="this.style.visibility='visible';" width='600'
class='frm'></iframe>").appendTo('body');
But it returns an error "syntax error this.style.visibility".
Can anyone help ?
edit:fixed spelling but now get the error
'missing ) after argument list'
You have a typo. Should be
this.style.visibility='visible';
required exit quotes \ and \
onload=\"this.style.visibility='visible';\"

Resources