Redirect in SimpleForms - bolt-cms

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

Related

Content-Security-Policy to make Tensorflow.js's WASM backend work (Chrome 91.0.4472.77, macOS 11.3.1)

Latest Chrome update breaks WASM backend when using Tensorflow.js. Apparently, browser enforces more strict Content-Security-Policy headers now.
Gist of the error (from console):
"Initialization of backend wasm failed"
"Error: Failed to construct 'Worker': Access to the script at 'blob:https://fiddle.jshell.net/c95fbade-77fe-4945-a4dc-25a3a19f97d6' is denied by the document's Content Security Policy.
Curious if anyone figured out a way to run it?
Browser/OS - Chrome 91.0.4472.77 / macOS Big Sur 11.3.1
To check out error go here - https://jsfiddle.net/alex_oliynyk/2b6oa4dm/14/
Cheers!
My question got answered in the Tensorflow.js repo. I'll repost the solution here in case anyone has the same issue.
CSP headers to help:
'Cross-Origin-Embedder-Policy': 'require-corp',
'Cross-Origin-Opener-Policy': 'same-origin',
Still, after figuring out CSP headers Tensorflow.js did not work. Threw an error connected to SIMD.
This appears to fix it for the time being:
tf.ENV.set('WASM_HAS_SIMD_SUPPORT', false);
tf.ENV.set('WASM_HAS_MULTITHREAD_SUPPORT', false);
It disables SIMD support and cuts performance, thus I hope it will be fully addressed in the future versions of the lib.
Cheers,

Issues with MantisBT and PhpStorm

I happily used PhpStorm and MantisBT together for months, but now I'm facing a strange problem.
Trying to establish a connection to my mantis instance (self hosted), I get the error:
Request failed. Reason: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
While I understand, what this error message means, I can't tell why it happens and I can't control the response I get from Mantis.
I neither found answers at the PhpStorm docs nor at Google nor at the Mantis bug tracker itself.
So I want to try my luck here. Is anyone else experiencing this or could give some advice?
Thanks to #user10550971 comment, I found the issue. The link to check if SOAP is enabled or not mentioned, that the PHP Soap extension was missing.
Although I would have sworn, that I didn't make any changes at server side, I did.
I updated my PHP version and forgot to install SOAP.

Uncaught TypeError: P.addInstancingSupport is not a function [autodesk-forge]

This morning I started getting this error when I try to display the model in my viewer, the code was working fine till last night. Upon looking into details, I see this error:
Uncaught TypeError: P.addInstancingSupport is not a function
at Aa (viewer3D.min.js:14)
at a.initialize (viewer3D.min.js:14)
at a.e.initialize (viewer3D.min.js:19)
at a.initialize (viewer3D.min.js:21)
at a.e.start (viewer3D.min.js:19)
at d.selectItem (viewer3D.min.js:21)
at onDocumentLoadSuccess (ForgeViewer.js:45)
at viewer3D.min.js:21
at j (viewer3D.min.js:20)
at XMLHttpRequest.p (viewer3D.min.js:4)
The error seems to be stemming from 'viewer3D.min.js'. I am fairly new to coding.
What version of the Viewer are you using? You can run LMV_VIEWER_VERSION from your console in Chrome Dev Tools. If the version is "1.X" you might want to check this https://forge.autodesk.com/blog/view-and-data-api-will-be-switched-next-week?linkId=40492041
Probably I will need to check more code in order to determine what could be going wrong, but I have a feeling you might be using an older version that just got deprecated.
Thanks! it worked.
I had to change the references from V1 to V2 for viewer scripts.

Getting rid of errors from using arrays as constants

So, as you may know, in PHP 5.6+, you can use arrays as constants. e.g.:
const MEMBER_TYPES = array("User", "Moderator", "Admin");
However, in my PHPStorm installation, I get an error when doing this, even though when running the code I get no errors at all, using PHP 5.6.8. None of the inspections I'm seeing via Alt+Enter are doing anything.. is there a way to suppress this specific error detection?
This functionality is not yet supported by PhpStorm
https://youtrack.jetbrains.com/issue/WI-26366 -- watch this ticket (star/vote/comment) to get notified on progress.
Reported as fixed in 10.0.2 by PhpStorm folks. https://youtrack.jetbrains.com/issue/WI-26366#comment=27-1257245

Is a de-obfuscated version of the realtime api available?

I'm running into issues with the realtime API and I'm unable to track down the root cause due to the obfuscation of the realtime library.
All I can see in the console is something like this when loading the document:
TypeError: a.b is null
...,A(a.aa,a));var f=b.requestParams,g;for(g in f)f.hasOwnProperty(g)&&e.X(g,f[g]);...
api (line 211)
Any ideas how to resolve such an issue?
There is not a de-obfuscated version available. If you post the specifics of what you are trying to accomplish, and the full stack of when you get an error, someone may be able to help.