Author Topic: Uncaught TypeError: Cannot read property 'pq_detail' of undefined  (Read 28267 times)

nuno.nogueira

  • Pro Economy
  • Jr. Member
  • *
  • Posts: 95
    • View Profile
Re: Uncaught TypeError: Cannot read property 'pq_detail' of undefined
« Reply #15 on: March 14, 2014, 12:21:14 am »
Sure, it is on lines 653 and 136.

Note: You may see the error at: http://www.portal-gestao.com/or%C3%A7amento.html#

If an empty month is loaded from scratch, no problem, the error is thrown only when changes are made to the data model.

Thanks for your support!

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Uncaught TypeError: Cannot read property 'pq_detail' of undefined
« Reply #16 on: March 14, 2014, 12:29:05 am »
your dev version is minified. It's difficult to see where is the issue. Could you use the dev file without any modification.

and which version are you using 2.0.3 or 2.0.4

nuno.nogueira

  • Pro Economy
  • Jr. Member
  • *
  • Posts: 95
    • View Profile
Re: Uncaught TypeError: Cannot read property 'pq_detail' of undefined
« Reply #17 on: March 14, 2014, 12:41:22 am »
Pls see attached, this forum is a bit complicated...

nuno.nogueira

  • Pro Economy
  • Jr. Member
  • *
  • Posts: 95
    • View Profile
Re: Uncaught TypeError: Cannot read property 'pq_detail' of undefined
« Reply #18 on: March 17, 2014, 05:24:56 pm »
Hi,

Did you have the chance to look into this?
Everything else seems to be working, except refreshing an empty table.

Thanks for your support!

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Uncaught TypeError: Cannot read property 'pq_detail' of undefined
« Reply #19 on: March 17, 2014, 11:02:06 pm »
The issue couldn't be reproduced at my end.

You have to include all js files in non minified format if you want me to take a look into what's going on.

nuno.nogueira

  • Pro Economy
  • Jr. Member
  • *
  • Posts: 95
    • View Profile
Re: Uncaught TypeError: Cannot read property 'pq_detail' of undefined
« Reply #20 on: March 18, 2014, 03:00:57 pm »
Hi,

Here they are:
http://portal-gestao.com/budget/orcamento.js

You may see the page at:
http://www.portal-gestao.com/or%C3%A7amento.html

This is most likely a bug, so I'd like to have you looking into it.

Thanks!
« Last Edit: March 18, 2014, 03:46:52 pm by paramquery »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Uncaught TypeError: Cannot read property 'pq_detail' of undefined
« Reply #21 on: March 18, 2014, 03:51:04 pm »
The scripts included inside the page are still minified.

Please include non - minified scripts inside the page and kindly mention detailed steps to reproduce the issue/issues.

nuno.nogueira

  • Pro Economy
  • Jr. Member
  • *
  • Posts: 95
    • View Profile
Re: Uncaught TypeError: Cannot read property 'pq_detail' of undefined
« Reply #22 on: March 18, 2014, 05:03:03 pm »
Hello,

We have disabled mod_pagespeed, I think the scripts are non-minified now.

In addition to the above scripts, the month-changer script should also be considered:
http://www.portal-gestao.com/budget/mescorrente.js

To reproduce the error, simply go to:
http://www.portal-gestao.com/or%C3%A7amento.html

And click "somar" at the bottom to go to the following month (april)
You'll see that there's no data but the main grid will not update. If you try to expand the sub-grid, you'll get the error.

The desired result should be an empty table with the message "no rows..."

Thanks!

nuno.nogueira

  • Pro Economy
  • Jr. Member
  • *
  • Posts: 95
    • View Profile
Re: Uncaught TypeError: Cannot read property 'pq_detail' of undefined
« Reply #23 on: March 20, 2014, 03:40:52 pm »
Hello,

Were you able to reproduce the error?
I'm on a bit of time pressure here to close this project, will it be possible to fix the problem?

If it is ok, I'll minify the files again. Please advise.

Thanks

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Uncaught TypeError: Cannot read property 'pq_detail' of undefined
« Reply #24 on: March 20, 2014, 11:23:20 pm »
Nuno

You would get the fix by Tuesday. It would be helpful ( just in case )  if you can keep the files unminified until this weekend.

nuno.nogueira

  • Pro Economy
  • Jr. Member
  • *
  • Posts: 95
    • View Profile
Re: Uncaught TypeError: Cannot read property 'pq_detail' of undefined
« Reply #25 on: March 21, 2014, 09:40:54 pm »
Ok, thanks a lot, I'll leave the files unminified.
But, the link is now:

http://ebudget.portal-gestao.com/app

Basically, the same stuff..

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Uncaught TypeError: Cannot read property 'pq_detail' of undefined
« Reply #26 on: March 25, 2014, 03:58:44 pm »
Nuno

As a workaround, please modify your getData method.

Code: [Select]
getData: function (dataJSON) {
        var data = dataJSON.data;
         if(!data || !data.length){
              var that=$(this).pqGrid("getThis").that;
              that.dataGM=null;
         }

         return {
              curPage: dataJSON.curPage,
              totalRecords: dataJSON.totalRecords,
              data: data
         };
 }

nuno.nogueira

  • Pro Economy
  • Jr. Member
  • *
  • Posts: 95
    • View Profile
Re: Uncaught TypeError: Cannot read property 'pq_detail' of undefined
« Reply #27 on: March 25, 2014, 11:43:42 pm »
Hi,

That has fixed it, thanks!

 :D