Odd Javascript Phenomenon... wondering if anyone else has experienced this

  • 0
  • 1
  • Question
  • Updated 7 years ago
  • Answered
I have noticed something odd in my custom JavaScript pages in my QuickBase applications the last couple months. I first encountered the problem at the very beginning of October when several of my custom JavaScript pages were no longer working.

I inspected the code and saw something funny. The word "company" was pre-pended many times before any occurrence of the word "document" in my script. For instance, this would occur at my jQuery $(document).ready wrappers (see attached example).

I noticed that this had happened in all my scripts where the word "document" was used. When I noticed this around the first of October, the word "company" always appeared 30 times. Just so happens there are 30 days in September. Again, I have noticed this phenomenon again in some of my scripts at the start of November. This time, the word company appears 31 (corresponding to 31 days in October?) times before each occurrence of the word "document."

My assumption is that this is some artifact of a script that QuickBase is running at the beginning of each month which loops through each day of the previous month.

I would love it if this could get fixed so I don't have to fix my pages every month. I am also curious to know if anyone else has noticed this in their JavaScript pages.
Photo of Brian

Brian

  • 0 Points

Posted 7 years ago

  • 0
  • 1
Photo of keirab

keirab

  • 20 Points
Unfortunately, I am pretty sure that I know exactly what happened to your script as I was a victim of the same bug that was introduced with the Sept 30th release. I discovered it the hard way, later that week and reported it with some escalation urgency and it was fixed the following Monday. The issue was that when you changed your table "Noun" (ie. what records in a table are called), it previously always prompted the user with "Do you want to change this everywhere?" and you could opt to see what would be changed, say no, or say yes. With the Sept 30th release, it completely skipped that prompt and just changed the former Noun text string to the new Noun text string EVERYWHERE, including in your db Pages where javascript is stored. So, in my case, I was changing a table from "Types" to "Proj Types" and ended up with a script where every instance of the word "type" was replaced. Sadly, when it replaced it i javascript, it put "proj proj proj proj proj type". In your case, I'm thinking that you or some other Admin renamed a table Noun from "xxx" to "Company" where "xxx" was the word that used to be there in your script. To fix your script, you will need to either figure out what word was replaced and fix them all or I would recommend that you open a Support Case with Intuit about this. Since their bug caused your script corruption, I would think they would be able to check a backup from pre-Sept 30th of your application to send you a copy of your dbpage before it was corrupted. It may help if you refer to their Issue ID QBE007374 in your Support Case, which was part of Patch G on 10/8/12.
Hope that helps, Keira
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,204 Points 20k badge 2x thumb
I don't think QuickBase should ever automatically change (1) the actual data in your tables, (2) the content of user defined pages or (3) the definition of your formulas. If such a change was ever needed you should be prompted for QuickBase to scan these areas and prompt you before making any changes. There are all sorts of situations where you might hard-code literal dbid's, fid's, qid's etc into these areas but since this was manually set by a user it should continue to be manually manged. For example there might be a service or wizard to scan for all instances of "www.quickbase.com" and substitute them with "subdomain.quickbase.com" but the user should be in complete control over if or when such changes take place.
Photo of Brian

Brian

  • 0 Points
@keirab Thanks!  That is quite plausible.  Also many thanks for a reference to the Issue ID.  I did not have a reference to that in my original support case and the response i got was "well, we don't review and fix custom JavaScript code."   I certainly wasn't asking them for that, but I did want them to acknowledge and fix their bug.

This conversation is no longer open for comments or replies.