PDA

View Full Version : [2.x] Session Provider example do not work with grid



pak0811
19 Aug 2008, 1:09 AM
What steps will reproduce the problem?
1. Implement that example to any application with Grid
2. Try any thing that trigger saveState, e.g. resize any column
3. Reload the page so that those state cookie are converted to session data

My Working Environment:
Firefox 3.0.1
Ext 2.2
PHP 5.2.0
Apache/1.3.34

What is the expected output?
The script should work properly and show the grid with state restored.

What do you see instead?
A JS Error:


s is undefined
ext-all-debug.js
Line 30451

Can you provide a fix for this problem?
The problem is that the session data is not encoded like what cookie have done. To fix:

In save-state.php line 12, replaces

$_SESSION['state'][substr($name, 3)] = $value;
to

$_SESSION['state'][substr($name, 3)] = urlencode($value);

Remarks
I am still very new to extJs. Maybe the example works elsewhere since I don't have so many resources to test this "bug" on every platform and every conditions. Please forgive me if I posted on a wrong forum.