Uncaught RangeError: Maximum call stack size exceeded #146
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: joomla/Component-Builder#146
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I'm still doing testing with 2.5.8, since I wanted to ensure that everything is working fine.
In JCB 2.5.5 everything would compile fine, and everything would load properly for my component on the frontend and the backend.
After the upgrade to JCB 2.5.8 I was doing some testing and was getting Error 0, which is such a non-descriptive error message. In looking at the call stack, it looks like under JCB 2.5.8 it was having issues with the joined com_categories table:
In looking at the dynamic get, the joined field is there, but I tested deleting then re-adding the table, which is when I noticed that it wasn't populating the selection area. Some other views were loading.
Digging deeper, there is a jQuery issue present on the admin views. I mentioned this during the staging, but it looks like it is still an issue. This issue is present on localhost, and if I backup and install the dev on my web hosting server.
I think when looking at your code dump, that you have a cache issue, please make sure to wipe your browser history completely and test again.
Just a side note, JCB upgrade did not change the compiler in anyway. They way the compiler worked before, is how it still works. In fact the data model of the subforms are identical to how the data model use to look, we use to convert it to that data model, so the subfrom array structure is in fact unchanged.
Compiling huge very complex components with JCB have been tested in git repositories and the result is only the change of date and version... so the compilation is still delivering the same result.
I routinely clear my cache, but to test I logged out of everything, cleared cache in chrome "from the beginning of time". Closed my browser, reopened. Logged back into Joomla. Cleared site and admin cache. Cleared expired cache.
I then went back into the dynamic get and did a CTRL F5, and still persists:
Clearing your cache is not enough, you must clear your browser history.
Well lets putt it this way... how many browsers do you have on your computer, if they all are giving the same error then we have reason to believe that we have a bug... but if only the one you always use do that, we would tend to think it is the browser and not the program.
If it as a bug that only happens in one browser, as it is possible. Then we should see that bug on our computers in that same browser... and the fact is I don't see that bug in chrome on my PC.
The code, or error response that you are sending me does not help really. There is not even any reason to believe that it is related to JCB... not that I am saying that it isn't, just that it does not give me anything to work with.
Some browsers store the JavaScript in the browser memory, to speedup the page load. When changes are made to the JavaScript these changes conflict with what is in memory. I cleared my memory and now all works well... that is why I think it is browser memory issue. I can be wrong... so let me know what you have experienced.
Here you can see me load the category table values (in chrome), and they all loaded with no errors.
I have another question, would you mind to share to code around line 249 in JROOT/components/com_mostwantedrealestate/models/properties.php
So I can look at the compiled code... then I will also need a few screen shots of the dynamic get that is used to build that model.
I think there are two issues here:
My first response is only targeting the JavaScript issue. Lets see what we can see around the compiled issue.
It appears to only be affecting Chrome. If I go to my dev site in Firefox, or Microsoft Edge, it works fine.
Clearing everything (except saved passwords) in Chrome isn't resolving it. I don't have the time to deal with Chrome acting up (whole day wasted due to Chrome apparently), so I'm going to have to dump Chrome for dev, and switch to Firefox or Edge.
I will need to dig into WHY JCB will compile my component perfectly fine in 2.5.5, but some of the view error out after 2.5.8. I know you said that there was no change to the compiler, but maybe something didn't "translate" correctly.
I'll update once I find anything. I'll probably start on it tomorrow.
@mwweb if you switch use Firefox and only pull on the other in testing.
You should check out https://www.chromium.org/
The Chromium projects include Chromium and Chromium OS, the open-source projects behind the Google Chrome browser and Google Chrome OS, respectively.
You can have both installed at once... well on Ubuntu anyway. So I run lets see...
Just to name the once I use often... testing and testing and testing... sometimes feels like madness.
Hey, my wife gave me a great encouragement the other day with a slogan she found on-line, not sure where. It said:
Here's the actual complete compiled model. This is one, but there are 4 or 5 different models that do the same thing, only since 2.5.8. My next step is going to be to cross compare a 2.5.5 compile to a 2.5.8 compile.
properties.zip
Screenshots of the get
OK. There is a difference in the compile at line 248-249:
2.5.5
// [Interpretation 1680] set catidIdCategoriesB to the $item object. $item->catidIdCategoriesB = $this->getCatidIdCategoriesCeef_B($item->catid);
2.5.8:
// [Interpretation 1680] set catidIdB to the $item object. $item->catidIdB = $this->getCatidIdCeef_B($item->catid);
Also, line 301-320.
2.5.5:
2.5.8:
Hmmm, okay thanks for sharing this... I will get on that and see if I can see the problem on my side.
It is clearly dropping some code... wow, not sure how I missed that. I will get back to you!
The Method that was changed that builds the dynamic get structure in the compiler is on line 2134 of the a_Get.php
This changed when we moved to v2.5.6 check the old method that still used the repeatable field structure here on line 2051 in v2.5.5
Let me know if you see a typo... I will also go over it a few times again. I know that is that only place where this bug should be... or so I think.
It looks like there are some definite differences between the two compiler files. There would be some, of course, but some in that particular area of the code.
Yes it has changed, that is what I said
I am asking if you are able to ready the code and see any typos or mismatching values. You can do
var_dump();exit;
at any of those lines and when the compiler runs you can look at the values.I need a new set of eyes on this because to me it looks correct.
I guess I'm not exactly understanding that you would like me to do to debug this. But I'll attempt to "fool around" with it and see if I can figure something out.
@mwweb can you check the json stored values of that Joined->db->Table
I have been testing this, and I can't duplicate that same behavior. I used Sermon Distributor to test, and JCB builds all the models correctly as before. What happens to the category.php (model) around line 274 if you compile SD?
I running some tests now, but this is for ro-ot.
If you want to check out what it is doing, please do the following:
In the newly compiled site/model/allsermon.php here is the compiled output:
Just a head-up if you add code block use three backtick also called grave accent
If you use only one, it is for inline code. Three is for code blocks.
The var_dump appears to be outputting the results current to screen, except an occasional undefined variable, but it looks like that may be due to existing the code prematurely.
Ok I got the same result this time, thanks @mwweb!
I also found the bug! the work around until the next release is to update a line in the compiler (a_Get.php) file.
Was a very stupid mistake. I think we missed it because the method is so big, but yes we have an undeclared variable in the method called
$value
on line 2310 in a_Get.php change it to$option1['selection']
and problem solved.So @Llewellynvdm was right there was a typo in that method!
Great work, I will add this to the next update.
Even in Firefox and MS Edge I still get the error popping up in the functionality, just doesn't show in the console output. I noticed it today when attempting to update a dynamic get. The selection area was not updating with the fields. So, I opened in Chrome, and there was the pesky error again.
In some reading, so far, what I have found is that the most common cause of "Maximum call stack size exceeded" most likely refers to one JavaScript function referring to another JavaScript function which returns back to the first function and therefor creates an endless loop.