Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load Error! (Bad request) #12

Open
ashtrakhov opened this issue Dec 15, 2017 · 23 comments
Open

Load Error! (Bad request) #12

ashtrakhov opened this issue Dec 15, 2017 · 23 comments

Comments

@ashtrakhov
Copy link

ashtrakhov commented Dec 15, 2017

Hi,
Im trying to use this plugin for my hierarchy and getting this error.
First node is loaded but when I open it i get this bad request error.

If I test my query in sql commands it retrieves data nicely without any issue.

Followed you installation instructions and everything looks ok.

How I can debug this issue? what can be possibly wrong?

image

My query goes like:
select COST_CENTER as value,
COST_CENTER_NAME as title,
COST_CENTER_NAME as tooltip,
'fa fa-user' as icon,
null as link,
level as lvl,
PARENTID as parent_id
from HUS_CC_HIER
start with PARENTID is null
connect by prior COST_CENTER = PARENTID
order siblings by COST_CENTER_NAME

Alexey

@mt-ag
Copy link
Collaborator

mt-ag commented Dec 19, 2017

Hey Alexey,
it could be that it is a bug in the AJAX call. Shaun also had the same problem
To fix it, change the size of the variable "l_check_children" to 32767 and try if it still throws an error.

@ashtrakhov
Copy link
Author

Thanks for your reply!
Tried that and unfortunately it didnt help right away.
Will try to test with standard dataset or some smaller dataset with very simple data.

@ashtrakhov
Copy link
Author

Hi,
Still the same issue. Tried to change the value(s) and even installing the plugin from the mentioned related issue.

Wondering if somebody else had this issue and was able to resolve. From Debug log I dont see anything useful.

Alexey

@mt-ag
Copy link
Collaborator

mt-ag commented Dec 22, 2017

Hey,
some other people also had the same issue. However, none were able to resolve the issue except for the person from the issue I linked.
The problem is that I can't replicate the issue, so it's basically impossible for me to find the issue. Are you running the APEX server on your local machine?

@ashtrakhov
Copy link
Author

Hi,
im runnin APEX now on my local machine and doing POC demo. Should I try the same on free APEX workspace on https://apex.oracle.com/ ?

Alexey

@ashtrakhov
Copy link
Author

hi,

Tried on apex.oracle.com and it is working. So the issue looks like with local installation of APEX.
Are there some prerequisites for this PLUGIN?

Alexey

@NeveenEbraheem
Copy link

NeveenEbraheem commented Dec 26, 2017

Hi all,
I am following up your comments.
mt-ag, i think it will be a good idea to tell us what exactly what version of every component you have in your development environment e.g. Os, Oracle Apex Version, browser type and version, JDK version, etc.

@mt-ag
Copy link
Collaborator

mt-ag commented Jan 2, 2018

Hey,
sorry for the late reply, I was gone over the holidays.
The APEX versions I have used are 5.1.2 and 5.1.3. Whenever I work on the plug-in, I use Windows 10 as well as Google Chrome. The APEX instance is not local though. A few months ago I found a forum post by someone that mentioned that there was some kind of bug when trying to access the local instance by using an IP address, which apparently some things in APEX use. Unfortunately, I can't find that post anymore.
The plug-in itself has no prerequisites. The plug-in uses a function provided by APEX to call the AJAX function to load the child nodes. I think that this function is affected by the bug described above.

@vanheel
Copy link

vanheel commented Apr 25, 2018

I wanted to implement your great plugin, but I also get this Load Error. Are you working on this issue? So I can wait till its ready instead of searching for another plugin that has the functionality to display a tree grid. Many thanks

@shaunmauer
Copy link

Hi

There are multiple variables used. If possible, please provide TeamViewer access to debug the variable causing the issue.

@vanheel @NeveenEbraheem @mt-ag @ashtrakhov

Regards,

@mendesn
Copy link

mendesn commented Jul 16, 2018

Just print the output in chunks of 32000

@mendesn
Copy link

mendesn commented Jul 16, 2018

@aroumeli
Copy link

Hi,

First of all I want to say that this is a great plugin and thank you for publishing it.

I had the same issue and I was trying to troubleshoot it. My understanding is that there is a problem with the last three parameters in the request: mode, parent and cache. It seems that for some reason, in some installations, they are translated as parameter for the wwv_flow.show procedure, which they are not. Although not quite, as it that was 100% true the response would be 404 instead of 400.
Anyway, what I did was to comment out the data: {mode: "children", parent: node.key}, line under lazyLoad and it now works. So questions on this and other things:

  1. What functionality am I missing out by commenting out this line? It seems to be working just fine.
  2. It seems from the code that the "dropped" event is only triggered if you change the parent of leaf. Is there a way to catch the reorder event under the same parent?
    An a couple of enhancement requests:
  3. It would be nice to store the value of the new leaf above the leaf you move when you dnd, so that one can store the order value (unless I'm missing something)
  4. It would also be nice if one could chose whether doubleclick opens a new window or navigates in the same one.

@sax59
Copy link

sax59 commented Aug 23, 2018

Hi all,
I tried the suggestion of aroumeli.
I commented on the line under lazyLoad :
_data: {mode: "children", parent: node.key}, _
but unfortunately it does not solve my problem.
I created, on apex.oracle.com, a simple application of a single page containing only the FancyTree plugin (1.1) region. (downloaded from https://github.com/mt-ag/apex-fancytree-plugin ).
It works
By exporting this application and importing it into my system:
Apex 18.1
Oracle 12c
OS: Windows Server 2012 R2 Standard
Browser: FireFox 61.0.2 or Chrome 68.0.3440.106
When I expand a node I get the error: "Load error (Bad Request)".

regards

@shaunmauer
Copy link

shaunmauer commented Aug 24, 2018

Hi @sax59

Please could you provide your apex.oracle.com login details for your example.

Does the data you are testing with on apex.oracle.com match the data being displayed in your local system?

Regards,
Shaun

@sax59
Copy link

sax59 commented Aug 24, 2018

Hi Shaun,
Yes, on apex.oracle.com I used exactly the same query on the same table I used on my local system.
In this environment the plugin seems to work (I have only tested the basic functionalities: the tree view with checkboxes and the expansion or compression of the nodes).

Here are the login details for my sample application.
https://apex.oracle.com/pls/apex/f?p=62992:3
ws: ws_sax5
user : [email protected]
pwd : @free

I also inform you that on this issue I have also opened the following discussion on the oracle community.
https://community.oracle.com/thread/4167103

regards
saverio

@shaunmauer
Copy link

@sax59 @aroumeli

Please test with this fork of the plugin - https://github.com/shaunmauer/apex-fancytree-plugin

@sax59
Copy link

sax59 commented Aug 24, 2018

thank you shaunmauer,
I tested this new version of the plugin on my local system, but I still have the same problem.
In any case, I discovered another interesting thing:
if you set the region static ID to any value (eg mytree) then the tree is not displayed at all (only the Expand All and Collapse All buttons are displayed).
if I leave the ststic ID field empty then the first level of the tree is displayed and when I try to expand a node I get the error "Load error (Bad Request)".

this last thing (setting static ID) also occurs on my sample application on apex.oracle.com

regards
saverio

@shaunmauer
Copy link

@sax59 Thank you for testing.

Please download latest copy, the error of the region not displaying when static ID is defined should be rectified

@aroumeli
Copy link

aroumeli commented Aug 24, 2018 via email

@shaunmauer
Copy link

@aroumeli The update caters for it being a String.

@sax59
Copy link

sax59 commented Aug 24, 2018

@shaunmauer @aroumeli
Ok, now the error related to the static ID has been corrected (even if string).
but the error continues to be present on my local system when I try to expand a node while it is ok on apex.oracle.com.

another observation:
after I receive the "Load error (Bad Request)". my Apex development session is closed.

if this can help in the investigation:
in the browser console (firefox) I get the following message:
<FancytreeNode(#94, 'INNOVATION')> Load children failed (Bad Request) Object { node: {…}, tree: {…}, widget: {…}, options: {…}, originalEvent: null, error: {…}, args: (3) […], message: "Bad Request", details: "400: Bad Request" } jquery.fancytree.min.js:13:171

regards

@HesamMohammadian
Copy link

Guys, in lazyLoad change cach:true to false; the issue will be solved inshaallah

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants