Topic: Item creation/editing problem (no answer)

I have some problem when creating or editing Items.

If I create one, the process will end with the "dead" Java triangle, but the item seems to exist.

When trying to edit one, the process also ends with the dead triangle, without filling the displayed Item fields.
It is the only process doing it, so I don't think the server is the explanation. Setting off Java doesn`t seem to help.

In config.php, $go_debug = 1. There is no message in the Error file.

How can I know precisely where it stucks ?

Gaston

Re: Item creation/editing problem (no answer)

Hello Gaston,

I am out of office. I have asked Janusz to handle this topic. I guess it has something to do with Javascript, but he will explain in detail what to do.

/Joe

Re: Item creation/editing problem (no answer)

Thanks. I`m on a halt because of this problem, and I don't know how to trace it.

When done, I will also port that information to the wiki.

Gaston

Re: Item creation/editing problem (no answer)

Hello Gaston,
Have you looked into System Daignostic page, and FAQ section 0.2? Especially try run FA without javascript (fallback mode), to eventually see any error messages which otherwise could be hidden during ajax calls.
Janusz

Re: Item creation/editing problem (no answer)

Page diagnostic (?) : no ?

Running without Java, yes, without more success.
I even started the sql tracing, got some catched, but I dont`t know if related.

Gaston

Re: Item creation/editing problem (no answer)

System Diagnostic page is available under Setup tab. Here you can check some important system parameters and whether the settings are correct or not. This is first step you should do in case of any strange problems.

I have no idea why just only Items page does not work for you - there is nothing special which differ this page from any other one. And this page works just fine on properly installed system (see e.g. demo). Maybe you have broken inventory/manage/items.php script file?

Janusz

7 (edited by huotg01 06/29/2010 04:22:21 pm)

Re: Item creation/editing problem (no answer)

Here is the only important message in Diagnostic page:

Language configuration consistency    Required    en_GB
fr_CA    Missing system locale: fr_CA.ISO-8859-1

But, when running this page with the debug switch on, I got the following messages:

Use of undefined constant LC_MESSAGES - assumed 'LC_MESSAGES' dans fichier: C:\Data\SitesWeb\rimqfa\admin\system_diagnostics.php à la ligne218
setlocale() [function.setlocale]: Passing locale category name as string is deprecated. Use the LC_* -constants instead dans fichier: C:\Data\SitesWeb\rimqfa\admin\system_diagnostics.php à la ligne218
setlocale() [function.setlocale]: Invalid locale category name LC_MESSAGES, must be one of LC_ALL, LC_COLLATE, LC_CTYPE, LC_MONETARY, LC_NUMERIC, or LC_TIME dans fichier: C:\Data\SitesWeb\rimqfa\admin\system_diagnostics.php à la ligne218
Use of undefined constant LC_MESSAGES - assumed 'LC_MESSAGES' dans fichier: C:\Data\SitesWeb\rimqfa\admin\system_diagnostics.php à la ligne233
setlocale() [function.setlocale]: Passing locale category name as string is deprecated. Use the LC_* -constants instead dans fichier: C:\Data\SitesWeb\rimqfa\admin\system_diagnostics.php à la ligne233
setlocale() [function.setlocale]: Invalid locale category name LC_MESSAGES, must be one of LC_ALL, LC_COLLATE, LC_CTYPE, LC_MONETARY, LC_NUMERIC, or LC_TIME dans fichier: C:\Data\SitesWeb\rimqfa\admin\system_diagnostics.php à la ligne233
Use of undefined constant LC_MESSAGES - assumed 'LC_MESSAGES' dans fichier: C:\Data\SitesWeb\rimqfa\admin\system_diagnostics.php à la ligne240
setlocale() [function.setlocale]: Passing locale category name as string is deprecated. Use the LC_* -constants instead dans fichier: C:\Data\SitesWeb\rimqfa\admin\system_diagnostics.php à la ligne240
setlocale() [function.setlocale]: Invalid locale category name LC_MESSAGES, must be one of LC_ALL, LC_COLLATE, LC_CTYPE, LC_MONETARY, LC_NUMERIC, or LC_TIME dans fichier: C:\Data\SitesWeb\rimqfa\admin\system_diagnostics.php à la ligne240

More than the final diagnostic on my problem, I`m looking to the process to debug it. Can we trace the java code  to see the last executed statement ?

Gaston

8 (edited by huotg01 06/29/2010 04:43:42 pm)

Re: Item creation/editing problem (no answer)

...also, I read back my previous messages on this thread and want to clarify a few points.

When using FA without javascript (fallback mode), I`m able to insert new items, retrieved them and edit them. But I have not more messages (errors) to help me to understand what is going on.

Also, when using Java, that may be simplify the problem if I say that when inserting a new item, without writing any field but just changing the drop down Category or the drop-down Item Type, without doing anything else, instantly the Java (or Ajax) turning wheel starts, ending with the triangle.

Gaston

Re: Item creation/editing problem (no answer)

First try the same tests with the same browser on our demo site. If you will find that the problems appear also here, you are sure this is some browser type related problem. Otherwise you will have to find what is wrong with server side configuration. I'm not sure  but I guess you are using some of famous M$ products. IE is well known as source of various kind of problems.

FA does not use Java but javascript only. Those are two completely different languages. You can trace javascript execution on browser using debugging tools like Firebug for Firefox. You can first look into javascript error console, which is standard part of Firefox. If you are using other type of browser like IE I cannot help, as I use only Firefox.

The locales are important on linux, if you are using Win based server you can safely ignore locales related messages.

Janusz

Re: Item creation/editing problem (no answer)

I'm using Google Chrome. No I don't have the problem on the demo site.

Please tell me what process is involved when choosing a different value in the field  Category of the Items page. I will track it from there.

Thanks,

Gaston

Re: Item creation/editing problem (no answer)

I had similar issues of search not working with IE. Used firefox now it works just fine.

12 (edited by huotg01 06/30/2010 11:57:50 am)

Re: Item creation/editing problem (no answer)

I took a drastic approach.

I just reinstalled a new company with a fresh en_US-new.sql
I went directly to Items and Inventory, open the Item page (no item created yet), then just changed the selection in dropdown Category field, ... and got the dead triangle.

I was using Chrome. I then went to Internet Explorer, did the same, got the same result, but also the reason of the error:

Details:

Web agent user : Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Tablet PC 2.0; OfficeLivePatch.1.3; OfficeLiveConnector.1.4; MS-RTC LM 8; .NET4.0C)
Timestamp : Wed, 30 Jun 2010 10:42:33 UTC

Message : Not allowed
Ligne : 743
Code : 0
URI : http://1080.xxxxxxx.com/rimqfa/company/1/js_cache/JsHttpRequest.js

And in JsHttpRequest

740        // Run submit with delay - for old Opera: it needs some time to create IFRAME.
741        var closure = function() {
742            // Save JsHttpRequest object to new IFRAME.
743            top.JsHttpRequestGlobal = JsHttpRequest;

Also, back to Chrome, I opened the javascript console and here is the message:

Unsafe JavaScript attempt to access frame with URL http://xxxxxxxxxx.com/rimqfa from frame with URL http://1080.xxxxxxxxxxx.com:180/rimqfa/inventory/manage/items.php?JsHttpRequest=12778985558330-form. Domains, protocols and ports must match.

Any idea ? Is it related to the port ?

Gaston

Re: Item creation/editing problem (no answer)

Seems this is some IE issue, maybe related to the fact that your server make use of non standard port 180. Please try change 'top' to 'window' in line 743 of /js/JsHttpRequest.js to have following line:

   window.JsHttpRequestGlobal = JsHttpRequest;

Janusz

Re: Item creation/editing problem (no answer)

This is not related to IE, nor any others Browsers.
It happens with all my Browsers.

As you said, it is more related to the ports, but not the port itself, more the fact that "Unsafe JavaScript attempt to access frame with URL http://xxxxxxxxxx.com/rimqfa from frame with URL http://1080.xxxxxxxxxxx.com:180/rimqfa/inventory/manage/items.php?JsHttpRequest=12778985558330-form. Domains, protocols and ports must match."

"...ports must match..."

And in this case ports doesn't match and this simple fact is probably causing the situation. I have an idea of what I can do but I will have to wait tonight to test it.

Gaston

Re: Item creation/editing problem (no answer)

itronics wrote:

Seems this is some IE issue, maybe related to the fact that your server make use of non standard port 180. Please try change 'top' to 'window' in line 743 of /js/JsHttpRequest.js to have following line:

   window.JsHttpRequestGlobal = JsHttpRequest;

Janusz

doesn't seem to change something...

Re: Item creation/editing problem (no answer)

So we have to wait for Joe's return from holidays. I can't help more as under linux google chrome works right, just like Firefox on both win and linux systems. I have no access to any Win system.

Janusz

17 (edited by huotg01 07/01/2010 03:49:53 pm)

Re: Item creation/editing problem (no answer)

That`s ok Janusz.

As I said, this is not related to the browser nor the OS.

The message in the java console gave a good indication of the problem:

"Unsafe JavaScript attempt to access frame with 
URL http://xxxxxxxxxx.com/rimqfa from frame with URL 
http://1080.xxxxxxxxxxx.com:180/rimqfa/inventory/manage/items.php?JsHttpRequest=12778985558330-form. 
Domains, protocols and ports must match."

Therefore, as said: "...ports must match...", and at least in this specific situation, it was not the case.

To confirm this, I tried this morning in a situation where the same port was used (everything else being the same: OS, browser) and it works fine.

This situation happens because I'm testing FA in a house internet environment, using DynDNS and I have to use a port different of the usual "80", that one being blocked by my ISP.

I'm just surprise because it is the very first time this happens, and I did a lot of testing with a lot of softwares with this environment.

I will try to solve that temporary (and somewhere false) problem. You could still help by telling me if a part of the URL ("http://xxxxxxx.com/RIMQFA" as an example) is stored somewhere in the files or in the tables (WordPress does, that's why I'm asking).

Thanks for your help

Gaston

Re: Item creation/editing problem (no answer)

Gaston,

This _is_ OS related problem. I can use linux google-chrome version on nonstandard ports without any problems, while you have problems with the same browser in Win environment. Of course we can consider FA buggy when it behave buggy in any popular environment or browser, but I can't fix on my box for reason explained above.

Moreover after short investigation I have to say that in any place during ajax call no modification is done to page URL, but IE/chrome claims about different ports. This is probably because of some nuance of xmlactivex implementation in Win or something like this. JsHttpRequest library knows about the requirement, and does not change http port number at all.

Answering to your question: no, url is not stored anywhere, it is retrieved from <form> action  on the page, and this is always the same page address.

Janusz

19 (edited by huotg01 07/02/2010 09:56:23 am)

Re: Item creation/editing problem (no answer)

Hi Janusz

First of all, I never pointed out FA as being bugged. I like FA, and I am in a debug mode because I want to used it. That's why I'm devoting so much time to it. That being said, if you take the time to answer my question, I hope you do it with the spirit to help, and not the spirit to defend yourself, if you see the difference.

Second, your test is unrelated to the present situation. I never said (and the error message listed never mentioned) that the problem was caused by an nonstandard port. If you read again the previous messages, you will see that it is related to a frame in a URL using port 180 is trying to access a frame in the same domain but in port 80, the 2 ports being different.

Now that I understand the cause (not the process that made it happening), I just changed a parameter in DynDNS (.com), removing what they call "cloak". My URL 1080.xxxxx.com:180 was cloak with URL www.xxxxx.com

Now it works fine, and I hope you learned as much as I did in this process.

Gaston

20 (edited by jgb974 06/27/2019 10:41:38 am)

Re: Item creation/editing problem (no answer)

Hi guys,

I am currently experiencing it in 2019 and only when i create a new item, it appears when I select category item, requests then yellow triangle.
FA 2.4.6 is remotely hosted with French COA.

Thanks,

Re: Item creation/editing problem (no answer)

Search the forum for 'yellow triangle', there are numerous posts; and many reasons why the warning triangle appears.

The FrontAccounting Wiki(Manual, examples, tips, setup info, links to accounting sites, etc) https://frontaccounting.com/fawiki/

Re: Item creation/editing problem (no answer)

thanks Poncho1234,

I finally sorted out the problem, it is a server-bandwidth related problem, it appears when you have a large COA (2000+ accounts like OHADA), my solution was setting timeout to 15s restarting all services, sometimes it still does it depending on server load, just refresh and check if operation was successful.

Cheers,

Re: Item creation/editing problem (no answer)

Glad you got it sorted.

Do you really have 2000+ accounts in your COA? Do you really actually use all the 2000+ accounts? Most companies wouldn't need more than 200...ish

The FrontAccounting Wiki(Manual, examples, tips, setup info, links to accounting sites, etc) https://frontaccounting.com/fawiki/

Re: Item creation/editing problem (no answer)

Actually not even 50, but I host FA for my customers, I am part of accountant office, so our customers just use FA so end of the month we run payroll and taxes etc...
so we have to keep all legal accounts just in case.

Cheers,
J