how to set Steps To Reproduce field required in MANTIS - mantis

Is this possible to setup Steps To Reproduce field so it's required?
It's always difficult to get enough info from reporters, so maybe forcing them to fill this field will help us - programmers - a little.
I would like to still be able to update mantis without troubles.

You are able to achieve this by changing, (in bug_report.php)
$t_bug_data->steps_to_reproduce = gpc_get_string( 'steps_to_reproduce', '' );
To
$t_bug_data->steps_to_reproduce = gpc_get_string( 'steps_to_reproduce' );
But on the advanced report it doesn't show an * (Asterisk) to indicate that it is mandatory. You have to add the * yourself in the PHP file.

Related

This document requires 'TrustedScriptURL' assignment in Google Sheets

I have a Google Spreadsheet where I have the following information on specific cells in the sheet:
Cell B1: Has the URL http://www.google.com.co/search?q=NASA+watching+now%3A+site%3Awww.youtube.com
Cell B2: has the following formula: =IMPORTXML(B1,"//title")
Here is the link of the Google spreadsheet - if you want to test from your side.
And here is the Google Spreadsheet I'm working on - which, I want to get the specific data:
Title: Text (in the h3 HTML tag of the result item).
Url: Link (in the <a> HTML tag of the result item)
Description: Text next to the thumbnail of the result item.
See screenshot with the data to get using IMPORTXML:
The previous code returns the title of the given URL - in this case, the URL stored in the B1 cell.
It was working without problems (since 12/02/2022 - dd/MM/yyyy) until today (13/02/2022 - dd/mm/yyyy).
I checked the Chrome console "F12 Developer tools" and I get this error:
This document requires 'TrustedScript' assignment.
injectIntoContentWindow # VM364:27
By clicking the # VM364:27 line, the following code is shown:
function injectIntoContentWindow(contentWindow)
{
if (contentWindow && !injectedFramesHas(contentWindow))
{
injectedFramesAdd(contentWindow);
try
{
contentWindow[eventName] = checkRequest;
contentWindow.eval( /* ERROR with and (X) is shown here. */
"(" + injectedToString() + ")('" + eventName + "', true);"
);
delete contentWindow[eventName];
}
catch (e) {}
}
}
Searching on the internet, I barely could get the causes of this error:
Google Chrome update - making security stricter.
Chrome extensions - try to disable such extensions and try again.
CPS (Content-Security-Policy) - must be honest = I don't understand this point; it's from the website to scrape the data OR from Google Sheets the CPS is the root cause?
The solutions given to this problem are in Python - with the use of DOMPurify - as is described in this answer, but, I don't know and neither have found any clues about this problem and its solution in Google Spreadsheets.
I've tried:
Recover previous working Google Spreadsheet version - the result is that the formula re-evaluates and no result is returned; looking in Console, the This document requires 'TrustedScriptURL' assignment message shows.
Disable Google Chrome installed extensions - I only have AdBlock (this code was working without issues), anyway, I turned off, reload the spreadsheet and the error mentioned above raises in Console.
Using another page - I tried with Wikipedia and Wiki.fandom and it works - i.e. data is returned. Probably in this case, Google injected in their searcher an script for avoid injection? - I'm really not sure, only speculating/rambling here.
Another possible cause I consider is maybe my IP was blacklisted or blocked, but, I'm not sure.
My browser information:
Chrome version: 98.0.4758.82 (Build oficial) (64 bits) (cohort: Stable)
Windows 10 Version 21H2 (Build 19044.1466)
Is there any way to solve this error in Google Sheets?
PS: I'm interested in know the workaround using google sheets and/or custom scripts - via script editor/Apps Script. The use of IMPORTXML function is not mandatory - I find curious that it was working and then today, not anymore.
I will just leave this here:
=INDEX(UNIQUE(REGEXREPLACE(QUERY(IMPORTXML(A1, "//a/#href"),
"where Col1 contains 'youtube.com/'"), "\/url\?q=|&sa=.*", )))
=IMPORTXML(A1, "//title")
=IMPORTXML(A1, "//h3")
TL;DR: This document requires 'TrustedScript' assignment error is not the root cause of the delay of the IMPORTXML function - probably there is other cause(s) (outside of the developer's handling), but, after all, the code works - see working google spreadsheet - just, wait until the results are shown or use another way to web-scrapping the desired data.
Since the This document requires 'TrustedScript' assignment message stays appearing in the Console of the browser, but, the code I posted on my question (and the code posted by SO user player0 in their answer) works, it seems to me that the delay of the response using IMPORTXML might be due its buggy functionality and/or some restriction Google detected by doing multiple requests.
So, here are my tips about this:
Check very closely how the page where the data will be extracted from and its structured before doing excessive requests - or you might face a significant delay in the response of the IMPORTXML function - as I experienced it.
Get more familiar with XPath and check if the data is dynamically generated in the page - this makes even harder to get the desired data using this way of scrapping.
This is the spreadsheet with the desired results - if anyone is interesed1.
1 Check the "Results-mix" sheet (which contains both the code I manage to create and the code provided by player0 in their answer).
If you really want to get similar results in a less convoluted way, consider use another strategy for web-scrapping or use official APIs - when available.

SuperCollider error: ServerOptions.memSize not understood

I ran into a memory error so I'm trying to allocate more memory to the server, as instructed by the IDE. However, it doesn't recognise the class method which is clearly documented. What could have possibly gone wrong??
There is absolutely nothing to my code, it's literally just
ServerOptions.memSize = 65536;
I've also tried what I found on a blog, which is
Server.options.memSize = 65536;
Which also does not work. Please help!! I want to make music!
To refer to the current server, use the global variable 's'. Also, capitalization counts.
s.options.memSize = s.options.memSize * 2;

Tag appears more than once while using Quickfix market data incremental refresh

I have implemented the fix client that request for market data. I have successfully logged on to the server but when the server sends us a MarketDataIncrementalRefresh message my application rejects with the message "Tag appears more than once" tag for which it is indicating is 55. Can you please help me in resolving it?
The message it rejects is:
8=FIX.4.2 9=196 35=X 34=14 49=Xenfin 56=newchange.api -price 52=20140528-08:54:32.144 262=156 268=2 279=1 269=0 278=B 55=EUR/USD 270=1.36201 271=1000000.00 279=1 269=1 278=A 55=EUR/USD 270=1.36205 271=1000000.00 10=133
and in my config file I have used no data dictionary and set UseDataDictionary=N
This usually means you have a configuration or DataDictionary problem, or both.
Configuration problem: Your config should have UseDataDictionary=Y, and DataDictionary=path/to/xml (or AppDataDictionary= and TransportDataDictionary= if you're on FIX5).
DataDictionary problem: Your counterparty has probably added custom fields to the message, and your DD hasn't been properly updated to reflect them. When parsing repeating groups, when the QF/n parser finds a field that doesn't belong (per DD) to the group, it assumes the group has ended. Any fields after that are considered to be outside the group.
You need to edit your DD file to reflect any changes that your counterparty has made to the standard message set. This will probably include adding custom fields, and may include rearranging field orderings or adding fields to groups that they don't normally belong in. See this page for more info about editing your DD:
http://quickfixn.org/tutorial/custom-fields-groups-and-messages
That's because you have a repeating group, once for bid, once for offer
8=FIX.4.2
9=196
35=X
34=14
49=Xenfin
56=newchange.api -price
52=20140528-08:54:32.144
262=156
268=2
279=1 269=0 278=B 55=EUR/USD 270=1.36201 271=1000000.00
279=1 269=1 278=A 55=EUR/USD 270=1.36205 271=1000000.00
10=133
and you're not handling it properly.

What handles dynamics:// URLs?

I'm trying to create my own custom drilldown functionality, where a URL dynamics://0?myfunction_123456 will launch my own code.
In C\SysStartupCmd\construct, this base code:
case 'viewalert':
sysStartupCmd = new SysStartUpCmdViewAlert(s,parm);
break;
case 'drilldown':
sysStartupCmd = new SysStartUpCmdDrillDown(s,parm);
break;
case 'viewalertrule':
sysStartupCmd = new SysStartUpCmdViewAlertRule(s,parm);
break;
I've tested and these all get fired with these URLs:
dynamics://0/?DrillDown_382576
dynamics://0/?ViewAlert_382576
dynamics://0/?ViewAlertRule_382576
However, if I add my own case, leaving all other code the same, I can't get the URL to fire:
case 'myFunction':
sysStartupCmd = new SysStartUpCmdDrillDown(s,parm);
break;
I've dug all over the system and can't figure out what causes the dynamics:// URL to only fire for those three cases. Is there a registry entry or something? I've found C\EventDrillDownPoller which appears to create a PipeServer to maybe handle what's incoming?
Of course, I figure out my own answer every time I type up a stackoverflow question, but I think the information is really useful.
This stack question led me to find out that C:\Program Files (x86)\Microsoft Dynamics AX\50\Client\Bin\AxHLink.exe %1 handles Dynamics:// URLs.
Which led me to Microsoft's community forums where somebody else was facing a similar problem as me.
So the solution would be to either:
Create custom a URI handler with C# or some other language to communicate to AX (Similar to this)
Hi-jack one of the 3 handled existing cases with some custom X++ code to try and fork off of it. Perhaps by changing the drilldown target in the URL and handling that way, or appending some special characters to the string.
Call "c:\Program Files (x86)\Microsoft Dynamics AX\50\Client\Bin\Ax32.exe" -startupcmd=myfunction_myParams and make that a clickable link.
You have answered your own question, but it is quite easy (if you know how) to hook on the standard DrillDown code to customize AX to start a specific form like:
Starts AX on item 03310511 in company XXX
start dynamics://TEST/?DrillDown_0?table=InventTable&field=itemId&value=03310511&company=XXX
It will assume reasonable defaults.
start dynamics://TEST/?DrillDown_0?table=CustTable&value=113545
And AX can be called from a HTML e-mail, assuming the receiver has an AX client!
113545
You find my customization in my pastebin.

DirectX Firefox Plugin rendering artifacts

QUICK ANSWER: For those of you who reach this page via Google looking for
a solution to the same problem, try
this quick fix (suggested by Goz) -
Add D3DCREATE_FPU_PRESERVE to the
behavior flags on your CreateDevice()
call. That cleared it up for me!
I'm creating a DirectX 9-based NPAPI plugin. It seems to be working well in Chrome and Opera, but in Firefox I get strange rendering artifacts. Upon initializing DirectX (no rendering needs to be done for the artifact to appear) all or parts of the Firefox UI will turn black. Resizing the window (IE: Initiating a repaint) clears up the artifacts and the plugin seems to work properly at that point, but this is obviously not a desirable "feature". I have found that several others online have mentioned this issue, most claiming that it began with Firefox 3. Only one post mentions any solution being found, but the author doesn't seem to keen on divulging how.
Is anyone familiar with this issue and a possible solution? From the linked post it would seem to be related to the way DX is initialized, but I've yet to find a combination that prevents the issue.
This is the DX Initialization code I'm using (Error Handling removed for clarity):
RECT rc;
GetClientRect(pluginHwnd, &rc);
D3DPRESENT_PARAMETERS d3d9PresentParams;
ZeroMemory(&d3d9PresentParams, sizeof(D3DPRESENT_PARAMETERS));
d3d9PresentParams.hDeviceWindow = pluginHwnd;
d3d9PresentParams.SwapEffect = D3DSWAPEFFECT_DISCARD;
d3d9PresentParams.Flags = D3DPRESENTFLAG_DEVICECLIP; // Failed attempt to solve FF issue
d3d9PresentParams.EnableAutoDepthStencil = FALSE; // No depth testing
d3d9PresentParams.PresentationInterval = D3DPRESENT_INTERVAL_ONE; // Use Vsync
d3d9PresentParams.MultiSampleType = D3DMULTISAMPLE_NONE; // Don't care about Multisampling
d3d9PresentParams.MultiSampleQuality = 0;
d3d9PresentParams.BackBufferCount = 1;
d3d9PresentParams.BackBufferWidth = rc.right - rc.left;
d3d9PresentParams.BackBufferHeight = rc.bottom - rc.top;
d3d9PresentParams.BackBufferFormat = D3DFMT_UNKNOWN; // Use the same color format as windows
d3d9PresentParams.Windowed = TRUE; // Explicitly windowed
d3d9PresentParams.FullScreen_RefreshRateInHz = 0;
d3d9->CreateDevice( D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, pluginHwnd, D3DCREATE_HARDWARE_VERTEXPROCESSING, &d3d9PresentParams, &d3d9Device );
The only thing I can think of off the top of my head is setting the "D3DCREATE_NOWINDOWCHANGES" behaviour flag on device creation.
Edit1:
You could try setting backbufferwidth and height to 0 and let it inherit the info from the window.
Might also be worth trying setting the D3DCREATE_FPU_PRESERVE flag and D3DCREATE_MULTITHREADED.

Resources