When saving the product (more precisely, changing the number of main items or in combination) with the multistore option enabled (only in the context of all stores), an error appears. Interestingly, after the second or next (how many stores in multi, how many times you have to click) the record goes correctly.
Recreation:
Go to BO >> set the shop context to >> "all shops"
go to the PRODUCTS tab >> edit the selected product >> change the STOCK (QUANTITY) to another >> click SAVE
I get a red message "Unable to update settings." and there is a problem with writing.
I get an error in JS console:
Failed to load resource: the server responded with a status of 500 (Internal Server Error).
There is no error in the NETWORK tab, despite the debugging mode enabled in Presta.
Screenshots:
https://prnt.sc/uj2uf2
https://prnt.sc/uj2ul7
https://prnt.sc/uj2v5f
https://prnt.sc/uj2w5v (headers)
https://prnt.sc/uj2w13 (preview)
https://prnt.sc/uj2vr8 (initiator)
https://prnt.sc/uj2vuk (response)
Data for the demo version:
This is the original, freshly installed version.
Only the multistore has been enabled and one demo store has been added. That's all.
BO: http://bielizniana.pl/__test/admin758a9z7cn/
Login: test#test.pl
Password: test#test.pl
You have set your multistore option "Share available quantities to sell" to NO.
This means when you are editing the product in All shops context it does not know what to do with your quantities.
I have a custom scheme mapped on my Windows machine: "dbn".
So, when I put dbn:/some/arguments in the Firefox address bar (or click on such a link), it launches in another application. This works great.
However, in a Firefox extension, I don't know how to "call" or "activate" this custom scheme except by opening a new tab, like this:
browser.tabs.create({ url: 'dbn:/some/arguments' });
That works fine, except now I have an open tab with dbn:/some/arguments as the URL. I have attempted to subsequently close it from my extension, but I can't because:
Error: Missing host permission for the tab
My extension doesn't have permissions for that "host."
I have tried to give it permissions via a match_patterns value of dbn:* but that throws an error when I try to reload the extension because those values apparently have to use one of the expected schemes (http, https, ftp, etc.).
I end up just having to close the tab manually, which isn't terrible, but is clearly sub-optimal.
So, two questions:
Is it possible to "call" a URL in such a way to activate a custom-mapped scheme on Windows without opening a tab? The only way I could think of doing this in such a way that it would activate my mapped command was to open a tab, but are there other ways?
If opening a new tab is the only way to do this, how do I close the tab I just opened without having the permissions problem I mention above?
Update
I don't think it's permissions anymore. The Promise simply won't resolve.
browser.tabs.create({ url: "some/url" })
.then(tab => console.error("I never get here"));
I've debugged up, down, and sideways. The new tab opens, and I can write to the log all around that operation, but the code in then just doesn't execute, no matter what I put in there. I tried to trap an error with try...catch, but that didn't trap anything.
I now think that permission above was coming from a different extension, not my extension. I don't think this has anything to do with the host.
AFA custom schemes, there is an open bug: Extend match patterns to handle custom protocol schemes
You can tabs.remove() a tab by its ID which you get from tabs.create().
async function fun() {
// note this is async
const tab = await browser.tabs.create({url: 'dbn:/some/arguments'});
// later remove it
browser.tabs.remove(tab.id);
}
// or
browser.tabs.create({url: 'dbn:/some/arguments'})
.then(tab => {
// do what is needed
// later remove it
browser.tabs.remove(tab.id);
});
Update:
Regarding the Promise, there is not enough information to pinpoint the issue.
Which permissions have been set?
Where is the code running?
Use catch to get more info about the Promise failure:
browser.tabs.create({url: "some/url"})
.then(tab => console.log(`Created new tab: ${tab.id}`))
.catch(error => console.log(error.message));
Recently I've installed the SAPGUI, and I want to turn on the auto-completion option "Suggest Non-Keywords from the Text".
But the button to save this setting is disabled.
How to save the setting?
Most likely a permission problem preventing the SAPGUI from performing updates.
C:\Users\\AppData\Roaming\SAP\SAP GUI\ABAP EDITOR\Settings.xml
Check how SAPGUI is Launched. Try launching with ADMIN rights.
Does your organisation restrict roaming profiles ?
Perhaps an admin guy there knows why you cant update
...AppData\Roaming\SAP\SAP GUI\ABAP EDITOR\Settings.xml
<Code_Completion>
<AutoCompletion>1</AutoCompletion>
<AutoOpen>0</AutoOpen>
<TimeOpen>1500</TimeOpen>
<UseExternalDict>0</UseExternalDict>
<UseLocalDict>1</UseLocalDict>
<QuickInfo>1</QuickInfo>
<CodeHints>1</CodeHints>
<KKCharsNum>2</KKCharsNum>
<AutoHideToolTip>1</AutoHideToolTip>
<AutoHideDelay>3000</AutoHideDelay>
<UseSimpleAutocomp>1</UseSimpleAutocomp> <<<<<< set this to 1
<CurrentScope>1</CurrentScope>
<Transparency>100</Transparency>
<HoveringDelay>500</HoveringDelay>
<HoveringInfo>1</HoveringInfo>
<CodeHintAgreeByReturn>0</CodeHintAgreeByReturn>
</Code_Completion>
For anyone facing this problem, I just uninstall and install the SAPGUI, and it solves.
I want to load a text file in Session.
The file size is about 50KB ~ 100KB.
When user trigger the function in my page. it will create the Session.
My Server's RAM is about 8GB. and the max users is about 100
Because there will be a script run in background to collect IP and MAC in LAN.
The script continues write data into text file.
In the same time, the webpage will using Ajax to fetch fresh data from text file.and display on the page.
Is it suitable to implement by session to keep the result? or any better way to achieve ?
Thanks ~
The Python script will collect the data in the LAN in 1 ~ 3 minutes.(Background job)
To avoid blocking for 1~3 minutes. I will use Ajax to fetch the data in text file (continuing added by Python script) and show on the page.
And my user should carry the information cross pages. So I want to store the data in Session.
00:02:D1:19:AA:50: 172.19.13.39
00:02:D1:13:E8:10: 172.19.12.40
00:02:D1:13:EB:06: 172.19.1.83
C8:9C:DC:6F:41:CD: 172.19.12.73
C8:9C:DC:A4:FC:07: 172.19.12.21
00:02:D1:19:9B:72: 172.19.13.130
00:02:D1:13:EB:04: 172.19.13.40
00:02:D1:15:E1:58: 172.19.12.37
00:02:D1:22:7A:4D: 172.19.11.84
00:02:D1:24:E7:0F: 172.19.1.79
00:FD:83:71:00:10: 172.19.11.45
00:02:D1:24:E7:0D: 172.19.1.77
00:02:D1:81:00:02: 172.19.11.58
00:02:D1:24:36:35: 172.19.11.226
00:02:D1:1E:18:CA: 172.19.12.45
00:02:D1:0D:C5:A8: 172.19.1.45
74:27:EA:29:80:3E: 172.19.12.62
Why does this need to be stored in the browser? Couldn't you fire off what you're collecting to a data store somewhere?
Anyway, assuming you HAD to do this, and the example you gave is pretty close to the data you'll actually be seeing, you have a lot of redundant data there. You could save space for the IPs by creating a hash pointing to each successive value, I.E.
{172 => {19 => {13 => [39], 12 => [40, 73, 21], 1 => [83]}}} ...etc. Similarly for the MAC addresses. But again, you can probably simplify this problem a LOT by storing the info you need somewhere other than the session.
I do performance testing of our Erlang application with OpenSTA. The test runs with 100 virtual users. At some point the following errors start popping up:
Yaws process died: {{badmatch,{error,eacces}},
[{yaws_server,ut_read,1},
{yaws_server,deliver_dyn_file,5},
{yaws_server,aloop,3},
{yaws_server,acceptor0,2},
{proc_lib,init_p_do_apply,3}]}
The test continues to run. I cannot find info about this error. Does eacces mean Error accessing a resource?
EDIT: As pointed out by #Muzaaya Joshua the call file:read_file(UT#urltype.fullpath) crashes in function ut_read(UT). I recompiled the module and printed the context. The error is eacces and UT holds:
{urltype,yaws,
{file_info,14088,regular,read_write,
{{2011,9,13},{11,51,42}},
{{2011,10,17},{17,59,44}},
{{2011,3,16},{13,18,58}},
33206,1,3,0,0,0,0},
"/handler.yaws",
"c:/Temp/harmony/script/../www/handler.yaws",
"/",undefined,undefined,"text/html",
"/handler.yaws",undefined}
This file handler.yaws is the entry point of our app and is called on every request. When I run the test with 100 or less virtual users I don't see these errors. So how can it be Missing permission for reading the file, or for searching one of the parent directories. as the error is described in the read_file documentation?
Thanks in advance.
Martin
eacces means access denied, the error codes are described at the end of the file documenation: http://www.erlang.org/doc/man/file.html#write_file_info-2
Yaws has failed to open a file. This is a file read permission denied to the user running yaws application. If you add permissions to the user running yaws to own all folders concerning yaws, this may be fixed. to check it out, try running yaws as root , if at all these paths are owned by root. The yaws_server.erl source file at the point is as follows:
ut_read(UT) ->
?Debug("ut_read() UT.fullpath = ~p~n", [UT#urltype.fullpath]),
case yaws:outh_get_content_encoding() of
identity ->
case UT#urltype.data of
undefined ->
?Debug("ut_read reading\n",[]),
{ok, Bin} = file:read_file(UT#urltype.fullpath),
?Debug("ut_read read ~p\n",[size(Bin)]),
Bin;
B when is_binary(B) ->
B
end;
deflate ->
case UT#urltype.deflate of
B when is_binary(B) ->
?Debug("ut_read using deflated binary of size ~p~n",
[size(B)]),
B
end
end.
The line in bold in the above source is where the bad match occurs.
Check wether yaws is running as a user with permissions to access its folders such as the doc root, ssl folders and other paths that yaws may access files. Does the user running yaws have access to all required files ?
In windows, this makes it easy. Now go to your Local disk C, Program Files (In windows 7, could be Program Files (x86)), lastly to where yaws is installed. This will be a folder: Yaws-VERSION e.g. Yaws-1.89. Now, when you right click this, you select Properties, then in the pop-up window you select Security. Under Security, you click edit. Now under Group or usernames, you select each user (and each type of account) and give it all permissions i.e. read, write, full control e.t.c. click Apply, wait for windows to perform the changes, then click Ok and close. Your users must now have all required permissions.
I managed to fix this errors by increasing the file size of the allowed in cache files in the YAWS configuration max_size_cached_file. This made our .yaws file to be loaded in memory and not accessess with file:read_file all the time. Hopefully this will save someone else couple of hours (or days :))