I'm testing my page in a bunch of browsers and in IE 8 i get the following error:
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E)
Timestamp: Mon, 20 Sep 2010 20:03:46 UTC
Message: Invalid argument.
Line: 1314
Char: 7
Code: 0
URI: http://192.168.1.93/JS/tiny_mce/tiny_mce_src.js
Any idea on how to fix this? My TinyMCE version is:
majorVersion : '3',
minorVersion : '3.9',
releaseDate : '2010-09-08',
My init is:
tinyMCE.init({
'mode' : 'exact',
'elements' : 'EDITOR',
'auto_focus' : 'EDITOR',
'theme' : 'advanced',
'plugins' : 'safari,save,preview,table,paste,insertdatetime',
'height' : h,
'width' : w,
'cleanup_on_startup' : true,
'fix_list_elements' : true,
'fix_table_elements' : true,
'fix_nesting' : false,
'theme_advanced_layout_manager' : 'SimpleLayout',
'theme_advanced_toolbar_location' : 'top',
'theme_advanced_toolbar_align' : 'left',
forced_root_block : '',
'theme_advanced_buttons1' : 'save, cancel, |, fontselect, fontsizeselect, formatselect, |, backcolor, forecolor, |, selectall, cut, copy, paste, pastetest, pasteword, |, undo, redo',
'theme_advanced_buttons2' : 'anchor, link, unlink, |, bold, italic, underline, strikethrough, sub, sup, |, numlist, bullist, charmap, |, outdent, indent, |, justifyleft, justifycenter, justifyright, justifyfull, |, insertdate, inserttime',
'theme_advanced_buttons3' : 'tablecontrols',
'theme_advanced_font_sizes' : '8pt,9pt,10pt,11pt,12pt,14pt,16pt,17pt,18pt,19pt,20pt,25pt,30pt,35pt,40pt',
'theme_advanced_buttons3_add' : '|, code',
'end' : 'end',
});
My height and width were messed up. The function I used to get h and w worked everywhere just fine everywhere but in IE.
I also had this error in IE8. Except the cause of mine was that I was not specifying a height/width at all. Even though it was still loading correctly, and adopting the size of the text box that it converted, it still threw an "invalid argument" exception.
Fixed it by adding this code to the init:
$('#' + textAreaID).tinymce({
...
height: $('#' + textAreaID).outerHeight(),
width: $('#' + textAreaID).outerWidth()
});
(using jQuery syntax)
Related
I have a electron app, so in my dashboard page i am getting an error look like this
Error: Unhandled "error" event.(File not found)
I am using tradingview widget.
var widget = new TradingView.widget({
// debug: true, // uncomment this line to see Library errors and warnings in the console
fullscreen: true,
symbol: 'AA',
interval: 'D',
container_id: "tv_chart_container",
// BEWARE: no trailing slash is expected in feed URL
datafeed: new Datafeeds.UDFCompatibleDatafeed("http://abc.loc/api"),
library_path: "../../assets/charting_library/",
locale: "en",
// Regression Trend-related functionality is not implemented yet, so it's hidden for a while
drawings_access: { type: 'black', tools: [ { name: "Regression Trend" } ] },
disabled_features: ["use_localstorage_for_settings"],
enabled_features: ["study_templates"],
charts_storage_url: 'http://saveload.tradingview.com',
charts_storage_api_version: "1.1",
client_id: 'tradingview.com',
user_id: 'public_user_id'
});
How can I get the file name which can not be found. Thanks!
Am trying to grok a message but its failing with _grokparsefailure in log but doesn't actually say what it's failing on. The grok query works on https://grokdebug.herokuapp.com/
input {
file {
type => "apache-access"
path => "C:/prdLogs/sent/*"
}
filter {
grok {
match => ['message', '%{IP:clientip} - - \[%{GREEDYDATA:raw_timestamp} \] "%{WORD:httpmethod} %{NOTSPACE:referrer} HTTP/%{NUMBER:httpversion}" %{NUMBER:response} "-" "%{NOTSPACE:request}" %{QS:UserAgent} %{WORD:httpmethodO} - - HTTP/%{NUMBER:httpversion2} "%{WORD:session}:%{WORD:httpmed}" "-" %{NUMBER:duration}' ]
}
date {
match => [ "raw_timestamp" , 'dd/MMM/yyyy:HH:mm:ss Z' ]
target => '#timestamp'
}
}
output {
elasticsearch { hosts => ["111.44.44.44:9200"] }
}
The data looks like:
199.77.22.22 - - [26/Feb/2017:10:18:45 +0800] "GET /myapp/app/i18n/key/parent.selector.label.select.item/?locale=en_GB&dojo.preventCache=1488075524942 HTTP/1.1" 200 "-" "https://mywebsite.here.com:31000/myApp/home.do" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; Tablet PC 2.0)" GET - - HTTP/1.1 "0000bKOk4n4SSBHuyJJKed085D6:1ap8u8p8j" "-" 3203
199.77.22.22 - - [26/Feb/2017:10:18:45 +0800] "GET /myapp/app/i18n/key/parent.selector.label.no.recently.used/?locale=en_GB&dojo.preventCache=1488075525483 HTTP/1.1" 200 "-" "https://mywebsite.here.com:31000/myApp/home.do" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; Tablet PC 2.0)" GET - - HTTP/1.1 "0000bKOk4n4SSBHuyJJKed085D6:1ap8u8p8j" "-" 3159
199.77.22.22 - - [26/Feb/2017:10:18:46 +0800] "GET /myapp/app/i18n/key/selector.label.selected/?locale=en_GB&dojo.preventCache=1488075525843 HTTP/1.1" 200 "-" "https://mywebsite.here.com:31000/myApp/home.do" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; Tablet PC 2.0)" GET - - HTTP/1.1 "0000bKOk4n4SSBHuyJJKed085D6:1ap8u8p8j" "-" 3600
199.77.22.22 - - [26/Feb/2017:10:18:46 +0800] "GET /myapp/app/i18n/key/actor.selector.label.remove.all/?locale=en_GB&dojo.preventCache=1488075526305 HTTP/1.1" 200 "-" "https://mywebsite.here.com:31000/myApp/home.do" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; Tablet PC 2.0)" GET - - HTTP/1.1 "0000bKOk4n4SSBHuyJJKed085D6:1ap8u8p8j" "-" 3224
199.77.22.22 - - [26/Feb/2017:10:18:46 +0800] "GET /myapp/app/i18n/key/com.label.filter.objects/?locale=en_GB&dojo.preventCache=1488075526711 HTTP/1.1" 200 "-" "https://mywebsite.here.com:31000/myApp/home.do" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; Tablet PC 2.0)" GET - - HTTP/1.1 "0000bKOk4n4SSBHuyJJKed085D6:1ap8u8p8j" "-" 3299
This is actually an apache access log but I was unable to use COMBINEDAPACHELOG or COMMONAPACHELOG. Same error actually!!
All entries in elasticsearch are tagged as "_grokparsefailure". I ran logstash in debug mode with log.level at debug but am not seeing any errors in the log.
Am using the latest version of logstash.
Please advise.
R2 D2 Thanks, I tried this but no joy :(
I created a patterns file and pasted your pattern. I just changed the payload to just "130.39.22.22 - - [23/Feb/2015:10:18:45 +0800]" and the following was my filter:
filter {
grok {
patterns_dir => ["c:/logstashconfig/patterns"]
match => ['message', '%{IP:clientip} - - /[%{DATE_CUSTOM:timestamp}/]']
}
date {
match => [ "timestamp" , 'dd/MMM/yyyy:HH:mm:ss Z' ]
target => '#timestamp'
}
}
The debug log in logstash:
{
"path" => "C:/prdLogs/sent/test",
"#timestamp" => 2017-03-03T00:06:15.269Z,
"#version" => "1",
"host" => "hkw20012125",
"message" => "130.39.22.22 - - [23/Feb/2015:10:18:45 +0800]\r",
"type" => "apache-access",
"tags" => [
[0] "_grokparsefailure"
]
}
Any ideas? Is it the +0800 at the end of the data?
Thanks.
I think once you have GREEDYDATA in your pattern, it means to consider rest of your line from the log:
GREEDYDATA's pattern looks like:
GREEDYDATA .* <-- means to capture the entire line
And your grok match should look something like this if I'm not mistaken:
grok {
match => ['message', '%{IPV4:clientip} - - %{GREEDYDATA:data}']
}
unless you need the values to be extracted separately, the above grok should do the trick for you. And I think the way you're matching the timestamp is wrong. In order to handle your timestamp you need to have the below patterns within your patterns file:
MONTHDAY (?:(?:0[1-9])|(?:[12][0-9])|(?:3[01])|[1-9])
MONTH \b(?:Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)?|May|Jun(?:e)?|Jul(?:y)?|Aug(?:ust)?|Sep(?:tember)?|Oct(?:ober)?|Nov(?:ember)?|Dec(?:ember)?)\b
YEAR (?>\d\d){1,2}
TIME (?!<[0-9])%{HOUR}:%{MINUTE}(?::%{SECOND})(?![0-9])
DATE_CUSTOM %{MONTHDAY}[/]%{MONTH }[/]%{YEAR}:%{TIME}
And then you could simply use this within your grok match:
grok {
match => ['message', '%{IPV4:clientip} - - \[%{DATE_CUSTOM:timestamp} %{GREEDYDATA:data}']
}
Now you'll be able to match the timestamp as:
date {
match => [ "timestamp" , 'dd/MMM/yyyy:HH:mm:ss Z' ]
target => '#timestamp'
}
Hope this helps!
When you have to build your own patterns, start from the left side, go slowly, and use the debugger.
If you test this pattern:
%{IP:clientip} - - \[
it works, but this one:
%{IP:clientip} - - \[%{GREEDYDATA:raw_timestamp} \]
doesn't. Comparing your pattern to the input shows that there aren't spaces between the timestamp and the close bracket.
Changing this part of the pattern to:
%{IP:clientip} - - \[%{GREEDYDATA:raw_timestamp}\]
works.
I have an instance of CKEditor 3.6.3 set up like this:
CKEDITOR.replace("notice_text", {
toolbar : "Mini",
enterMode : CKEDITOR.ENTER_BR,
fillEmptyBlocks : false,
forcePasteAsPlainText : true,
skin : "office2003",
width : 375,
height : 100
});
For this textarea:
<textarea id="notice-text" name="notice_text" rows="5"></textarea>
Mini is a toolbar defined in the config.js.
All the settings in replace work fine except forcePasteAsPlainText.
However, when I set forcePasteAsPlainText in the config.js it works. Like so in the config.js:
config.forcePasteAsPlainText = true;
Setting it in the config.js applies it to all CKEditors on the site and I wanted it to apply to this one textarea.
I took a look at the CKEditor changelogs and didn't see anything that would address this with an update.
I thought you could set it in the replace function. Is that not possible or am I missing something?
Add removePlugins : "pastefromword" to your config.
CKEDITOR.replace("notice_text", {
toolbar : "Mini",
enterMode : CKEDITOR.ENTER_BR,
fillEmptyBlocks : false,
forcePasteAsPlainText : true,
skin : "office2003",
removePlugins : "pastefromword" ,
width : 375,
height : 100
});
This force exists plugin pastetext in your config, and pastefromword not exists in. Run again ==> Its work!
I've been trying to use the arbor layout. I've tried
layout: {
name:"arbor"
}
and
layout: {
name:"arbor",
liveUpdate: true,
ready: undefined,
maxSimulationTime: 4000,
fit: true,
padding: [ 50, 50, 50, 50 ],
ungrabifyWhileSimulating: true,
repulsion: undefined,
stiffness: undefined,
friction: undefined,
gravity: true,
fps: undefined,
precision: undefined,
nodeMass: undefined,
edgeLength: undefined,
stepSize: 1,
stableEnergy: function( energy ){
var e = energy;
return (e.max <= 7) || (e.mean <= 5);
}
}
In both cases the firebug console reports
arbor is not defined
http://localhost/WS/BioJS/biojs/src/main/resources/dependencies/cytoscape/jquery.cytoscapeweb.layout.arbor.js
Line 76
I'm I missing something?
is there a working example of the arbor layout usage?
You need to include arbor.js in a script tag in your HTML. The file jquery.cytoscapeweb.layout.arbor.js just interfaces arbor with Cytoscape Web. Make sure you use the version of arbor.js bundled in the Cytoscape Web ZIP if you need IE support -- arbor doesn't provide this out of the box.
The reason why arbor.js isn't embedded in jquery.cytoscapeweb.layout.arbor.js is because arbor.js needs to be in its own script tag in order for web workers to work properly. If you concatenate and minify arbor.js with your app's other scripts, arbor's path finding can break or arbor's webworkers could conflict with other webworkers in your app.
To compress Javascript and CSS files I am using Yahoo for a solution. Net (http://yuicompressor.codeplex.com/)
I have an object:
defaults = {
html: "",
opacity: 0.6,
loadOnDemand: true,
showEffect: "fade",
hideEffect: "fade"
};
Note the value 0.6
Result after compression:
defaults = {
html : "",
opacity : 0,
6,
loadOnDemand : true,
showEffect : "fade",
hideEffect : "fade"
};
I am using the task (MSBuild) for Visual Studio to compress my JS.
The following XML code:
<CompressorTask
CssFiles="#(CssFiles)"
CssOutputFile="$(cssFile)"
CssCompressionType="YuiStockCompression"
PreserveCssComments="false"
JavaScriptFiles="#(JavaScriptFiles)"
ObfuscateJavaScript="false"
PreserveAllSemicolons="true"
DisableOptimizations="Nope"
JavaScriptOutputFile="$(jsFile)"
LoggingType="ALittleBit"
IsEvalIgnored="false" />
Full code in: https://gist.github.com/1817326
looking for an answer, found this thread: http://yuicompressor.codeplex.com/discussions/243522
But did not help me much