ISSUES IN TABLE USING PHP-GRID

QuestionsISSUES IN TABLE USING PHP-GRID
Joshy AJ asked 3 years ago

Hello,

I am working on a web application that uses your PHP Grid of version 2.6.2 and build 20190320-1605. Now I have two questions:

  1. Currently the web application that use your php grid is installed directly in a Linux server. Now I am setting up a local development version of the tool by installing a web server and copying the PHP files and other components to local. The other components work well, but it does not work with Report tables that use PHP Grid. Below are some of many errors while trying to access a report table:
    • Warning: Undefined array key \”readonly\” in C:\\xampp\\htdocs\\scripts\\phpgrid\\inc\\jqgrid_dist.php on line 974
    • Warning: Undefined array key \”subGrid\” in C:\\xampp\\htdocs\\scripts\\phpgrid\\inc\\jqgrid_dist.php on line 996
    • Warning: Undefined array key \”hiddengrid\” in C:\\xampp\\htdocs\\scripts\\phpgrid\\inc\\jqgrid_dist.php on line 839
    • Warning: Undefined array key \”autocolumn\” in C:\\xampp\\htdocs\\scripts\\phpgrid\\inc\\jqgrid_dist.php on line 1309
    • Warning: Undefined array key \”editoptions\” in C:\\xampp\\htdocs\\scripts\\phpgrid\\inc\\jqgrid_dist.php on line 1690
    • Warning: Undefined array key \”frozen\” in C:\\xampp\\htdocs\\scripts\\phpgrid\\inc\\jqgrid_dist.php on line 1874
    • Fatal error: Array and string offset access syntax with curly braces is no longer supported in C:\\xampp\\htdocs\\scripts\\phpgrid\\inc\\htmlpurifier\\HTMLPurifier.standalone.php on line 3926
    • May I know the reason why it does not work with the newly setup dev version and how to fix the same?
  2. Currently the column headers of the reports that use the grid are not viewable when scrolled down to the lower part of the table. This confuses the user that the column cells belong to which column headers when moved down. Is there an option to freeze the table column headers so that they are viewable all the time.
  3. Herewith attached the link of the picture of the table https://imgur.com/a/ULyZiSL

Thank you in advance!!!

Regards, Joshy A J

Joshy AJ replied 3 years ago

Hi both, as suggested by you, I have installed a new PHP server of version 7.4 and also updated jqgrid_dist.php file with the command to suppress the warnings. But these changes do not help as well. Still I am unable to access the report. Only one improvement is I am able to view the skeletal structure of the table now, with column headers but without any data along with an error “undefined”. Please check the link for the snapshot of the table along with error.

https://imgur.com/NcXaDml

Also there is no improvement on freezing column headers.

12 Answers
Abu Ghufran Staff answered 3 years ago

Hi,

Looks like the packaged version contains an older version of htmlpurifier. It’s updated on our dev line.

Please download latest version of htmlpurifier library from:
http://htmlpurifier.org/releases/htmlpurifier-4.13.0-standalone.zip
 
And extract files in the lib/inc/htmlpurifier folder.
It should fix this issue. After that you can disable the display_errors option.

For headers, the default grid display have frozen columns with scrolling in rows. I’m not sure if the result you are getting is due to some “height” configuration. You can share code for review. The screenshot you attached does not show if the scroll bar is on right side or not.

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Joshy AJ replied 3 years ago

Thank you for the support. I have downloaded the said version of htmlpurifier and extracted in the relevant folder. But that does not fix the issue. Still I am unable to view the report tables.

For column headers issue, I am using height as 100% ($grid_opt[“height”]=”100%”;). But I have modified the same to 400% as mentioned in the document linked below to enable vertical scroll bar. Both are not working as vertical scroll bar is not yet visible and column headers cannot be frozen.

I have also attached herewith the link for the source code.

Link for documentation:
https://www.gridphp.com/docs/grid-options/

Link for source code used:
https://gist.github.com/joshymech/a944ead9200ad51b490b85c759e61856

Meeoun answered 3 years ago

Im having the same issue with the newest version of the framework. 2.8.  I have it installed in laravel on Centos running PHP8 through Apache.  I just purchased a dev license.  I have used your enterprise license in the past.  Thought the issue was due to PHP8 support, so, purchased new version and ran right into the same problem

 

https://imgur.com/a/le7FJfB

https://imgur.com/a/JYy22WW

 

 

Meeoun answered 3 years ago

Are we sure about the php 8 compatibility?  If I downgrade from 8 to 7.4, the phpgrid works as expected.  I just purchased the most recent version which boasts php 8 compatibility.

Abu answered 3 years ago

I reviewed the case and found that php8 is marking undefined key notice as ‘warning’. I’ll be testing more and updating the build.

A quick temporary fix is to skip the warning from being reported.

error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING & ~E_DEPRECATED);

This needs to be updated in jqgrid_dist.php top of the code.

Meeoun answered 3 years ago

Thanks Abu, that does solve the issue with PHP 8.  Hopefully that ended up being Joshy’s issue as well.

Meeoun answered 3 years ago

Hi Abu, I posted this on another thread as well.  There appears to be another issue with the use of PHP8 and gridphp.  Perhaps it is a good idea to indicate to the users to not use PHP8?

 

If you attempt to export data, it throws a

“Array and string offset access syntax with curly braces is no longer supported”

@

app / Classes / phpgrid / excel / PHPExcel / Shared / String.php: 529

Joshy AJ answered 3 years ago

Hi both, as suggested by you, I have installed a new PHP server of version 7.4 and also updated jqgrid_dist.php file with the command to suppress the warnings. But these changes do not help as well. Still I am unable to access the report. Only one improvement is I am able to view the skeletal structure of the table now, with column headers but without any data along with an error “undefined”. Please check the link for the snapshot of the table along with error.

https://imgur.com/NcXaDml

Also there is no improvement on freezing column headers.

Meeoun answered 3 years ago

Hi Joshy,

Sorry to hear that, all of my problems have centered on PHP8 support, which may have intermingled into some of your core issues as well.  I’m not sure how complex your integration is. I know that they can get over complicated quickly if we are not careful. I would attempt to get a simple grid working if possible.  Don’t set any grid options, just aim it at a specific database table (maybe test table) and make sure that the core works as expected at the simplest level.

 

 

 

Joshy AJ answered 3 years ago

Thank you meeoun for the suggestions. Tried removing all grid options, but there is no improvement at all. I am afraid you could be right. Somehow different configurations got overlapped together.

Abu Ghufran Staff answered 3 years ago

Hello Joshy,

Regarding error “app / Classes / phpgrid / excel / PHPExcel / Shared / String.php : 529″, This is already reported and solved and does not link to php8. Perhaps you are using an older version.

Regarding the ‘undefined’ error, You need to check php error log file to get details.

I am also unable to locate your email address in licensed customer’s list. So You can email me your order number and payment email address to get latest build which don’t have this issue.

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Joshy AJ answered 3 years ago

Hi Abu,

I have gone through the error log file as suggested. All “undefined” statements in the log seem to be just warnings on missing array key in the file jqgrid_dist.php, not errors. Hence this might not be the reason for the report table issue. Apart from these, I do not find any credible evidence on report table issue in the log.

Regarding license, I am an IT consultant working for a firm that uses your software. So you might not have found my mail address. I will consult the management to get order number and e-mail address so that you could send the latest build and support us further. Thank you.

Abu Ghufran Staff answered 3 years ago

@Joshy, As of php8.1, undefined key is shown as warning whereas it was notice in earlier version.

One solution (not the best one) is to hide the warnings on line 10 of jqgrid_dist.php.

error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING & ~E_DEPRECATED);

It should slient these issues. You can contact back with the payment email address and we can have a remote session as well to check the issue.

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Your Answer

17 + 20 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?