Why does MediaWiki DrawioEditor extension drop "Call to a member function getRepo() on bool" error? - mediawiki

I installed DrawioEditor extension for MediaWiki, but as soon as I insert {{#drawio:ChartName}} and save, I got the error message in the title with a fairly long backtrace. Can someone help me out here?
I am running:
MediaWiki 1.35.6
PHP 7.4.30 (fpm-fcgi)
MariaDB 10.3.32-MariaDB
DrawioEditor 1.1 (ec19d0f)20:07, 2023 January 5
Thank you in advance!
Attila
Based on another suggestion here (DrawioEditor extension does not seem to work in MediaWiki 1.33), I made sure NativeSvgHandler is properly installed, and the following options are active:
$wgDrawioEditorImageInteractive = true;
$wgFileExtensions[] = 'svg';
$wgEnableUploads = true;

Related

Redirect in SimpleForms

Using SimpleForms I define a page to use in
redirect_on_ok: page/thank-you
I get this error:
Call to undefined function Bolt\Extension\Bolt\SimpleForms\simpleredirect()
(Bolt 2.02, bolt/simpleforms 0.10)
Can this be repaired?
PS Gawain if you read this, I'd love to give your extension a try sometime, but the SimpleForms documentation is more readable for me at this moment.
I think you found a bug in the simpleforms extension, it is already reported https://github.com/jadwigo/SimpleForms/issues/2
--
the bug is fixed in the latest version of bolt

Getting AIR stacktraces in ipad for release build [duplicate]

I'm trying to debug an issue on a clients machine. The problem is that the problem is a runtime error with very little clue as to where it is. It is an intermittent problem. I know ADL allows me to run the application in a debug mode. The problem is that to tell the user to download and manage the ADL invokation is going to be very difficult. It would be a lot easier if I could just give the end user one install/executable to install and run and then send me the trace of the issue. So what I'm looking for is easy steps for the client to be able to run the AIR app in debug mode. Downloading ADL and finding the install location of the app is going to be difficult to manage remotely with the end user.
Update:
You have to make sure you are working with AIR 3.5 and Flash 11.5 and also include the following flag "-swf-version=18" in additional compiler settings. You then have to catch the global error as mentioned in the answer and it will show you the location of the error. No line numbers of course. Just routine names. Thanks a milion to Lee for the awsome answer.
not a direct answer but if you publish for AIR3.5 (or 3.6 beta), you can get some debug info:
add a listener for uncaught RTEs to top level of your app:
this.loaderInfo.uncaughtErrorEvents.addEventListener(UncaughtErrorEvent.UNCAUGHT_ERROR, globalErrorHandler);
and grab debug info from error in listener:
function globalErrorHandler(event:UncaughtErrorEvent):void
{
var message:String;
//check for runtime error
if (event.error is Error)
message = (event.error as Error).getStackTrace();
//handle other errors
else if (event.error is ErrorEvent)
message = (event.error as ErrorEvent).text;
else
message = event.error.toString();
//do something with message (eg display it in textfield)
myTextfield.text = message;
}
getStackTrace will return a stack trace even for release AIR apps (as long as you use AIR3.5 or above).
Without the SDK Tools; I don't think it is possible to run an aIR app in debug mode. But, here are a few alternatives to consider:
The client must have some idea what is going on to cause the error, right? Can you give them a special build with Alert Boxes or logging or something to help isolate the error to a line of code?
Can you listen for the uncaughtException event? The event will give you the full stack trace ( Error.getStackTrace() ); which you could then log--possibly with other information. Then you just have to tell your client to "Go here" and "send me this file." Or even display the info in some Alert and have the user copy and paste it into an email to you. More info on uncaughtException here and here
check my post. Maybe it helps you to get stack trace with line numbers in a AIR release build.
How can I get stacktrace for Adobe AIR global runtime errors in non-debug mode?
I use it in 2 big projects right now and it works very well.
Greetings

chrome.app.getDetails() returns null

I was trying to get the version of my extension at run-time using chrome.app.getDetails().version and noticed that chrome.app.getDetails() returns null. Surprisingly, there is no talk about this in the online community and the function isn't even documented by the Google folks. Is there a permission I am missing? I do have tabs enabled.
Very old... I know
But in case if someone is looking for this, you can have your extension version reading the manifest file with chrome.runtime API and the getManifest Method.
Ex. in your background script:
var manifest = chrome.runtime.getManifest();
var current_version = manifest.version;
console.info('Current Version: ', current_version);
The object returned is a serialization of the full manifest file, so you can get all the info in the manifest file
So.. if you want for example all and only the matches of your content_scripts... for say something...
for(var i in manifest.content_scripts) {
console.log(manifest.content_scripts[i]['matches']));
}
Note: Stable since Chrome 22
It's undocumented because they might be moving getDetails to a different part of the API -- see this bug. It's currently working on my copy of Chrome (beta channel), but I wouldn't be surprised if they've disabled it in a newer release. In the meantime you can just do an AJAX query to get the manifest.json of your extension -- you can get its URI using chrome.extension.getURL("manifest.json").
Here is what I'm using to pull the current version.
var manifest = new XMLHttpRequest();
manifest.open("get", "/manifest.json", true);
manifest.onreadystatechange = function (e) { if (manifest.readyState == 4) {console.log(JSON.parse(manifest.responseText).version)} };
manifest.send({});

Does SWFJunkie Tweetr's PHP Proxy still work?

I've recently been asked to help support a system which uses the PHP Proxy provided by SWFJunkie. In following the proxy's install steps I get to Step 4 at which point I get no results. I've tried hosting on Apache and IIS, have confirmed that URL rewrites work correctly on both platforms and that CURL is correctly installed, and have ensured there are no firewalls blocking my requests.
In researching this issue I've seen that Twitter have been changing their API rules (with more changes set to take place in March next year). The last activity I can see on the Proxy project was back in 2010, after which it seems to have gone dead. Before I put in more effort trying to get this to work I thought I'd ask - is anyone else currently using this / do you have it working?
If you have it working I'd welcome any tips / advice you have also, but mainly I just want to know in advance whether this utility still works in order to justify spending time on it.
Thanks in advance.
the proxy does still work, but I had to tweak the code a little.
Thanks to #MikeHayes for the solution: Twitter OAUTH - returns response code of "0"
For anyone else having this issue, the quick fix is to update Tweetr.php. Find the code matching what's below & insert the additional (commented) line on the end.
$opt[CURLOPT_URL] = $twitterURL;
$opt[CURLOPT_USERAGENT] = $this->userAgent;
$opt[CURLOPT_RETURNTRANSFER] = true;
$opt[CURLOPT_TIMEOUT] = 60;
//BEGIN UPDATED CODE
$opt[CURLOPT_SSL_VERIFYPEER] = false;
//END UPDATED CODE
Thanks again to Mike & good luck to anyone else currently having this issue.

SQL Server Alert using WMI Event ERROR

I want to execute a job when ever a file is dropped into a particular folder.
I found some articles that showed me how I can do it on SQL Server.
I created a alert type: WMI Event Alert
For the name space its the SQL instance which comes automatically as \\.\root\Microsoft\SqlServer\ServerEvents\MSSQLSERVER
On the Query section - I wrote the below query ,
SELECT *
FROM __InstanceCreationEvent
WITHIN 1
WHERE TargetInstance ISA 'CIM_DataFile'
AND TargetInstance.Name = ‘c:\\TestFolder\’ `
The error message returned is:
Cannot create new alert.
ADDITIONAL INFORMATION:
Create failed for Alert 'AlertTest'. (Microsoft.SqlServer.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.2425.0+((KJ_PCU_Main).110406-2044+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Create+Alert&LinkId=20476
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
SQLServerAgent Error: WMI error: 0x80041058
The #wmi_query could not be executed in the #wmi_namespace provided. Verify that an event class selected in the query exists in the namespace and that the query has the correct syntax. (Microsoft SQL Server, Error: 22022)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.2425&EvtSrc=MSSQLServer&EvtID=22022&LinkId=20476
Please may you advise if my Query is correct and if there is anything else I need to check?
Thanks a lot in advance.
You are using the wrong namespace, the CIM_DataFile WMI class is part of the \root\CIMV2 namespace and not of \root\Microsoft\SqlServer\ServerEvents\MSSQLSERVER
In this case, the answer from RRUZ is correct. However there are other possible causes of this error message:
The #wmi_query could not be executed in the #wmi_namespace provided.
One possible reason is the account that runs the Windows service "Windows Management Instrumentation" is disabled as a SQL login. (If you are running SQL 2012+, look for the login 'NT SERVICE\winmgmt').
(Source: Blog by 'rahmanagoro' )
Edit 2020-05-29: I've made a more comprehensive answer to this question on the DBA forum.
Another possible fix is to restart the "Windows Management Instrumentation" service. No idea what leads to the problem, but restarting the service fixes it. I've seen this twice, both times on Windows Server 2008 R2 Standard Edition x64.
Edit 2020-05-29: I've made a more comprehensive answer to this question on the DBA forum.