10th preview for P4A 3, major upgrades and optimizations

The test phase is going on, thus some small modifications were done on many parts of the P4A codebase.

  • One important things for developer is that now all P4A_DB methods can use the “binding” feature coming with Zend Framework/PDO.
  • Other improvements were achived if you run P4A on Windows servers
  • FCKEditor was updated the new and shining 2.6 release and other libraries were updated too

but the most wonderful improvement is the Javascript/CSS lazy loading. We’re many heavy javascripts bundled with P4A (FCKEditor, the date picker etc…) and sometimes your app won’t use them… now every component is loaded only when needed and your applications will start and run much faster!

Anyway, let’s review the changelog:

– a bug with P4A_Field::getAsRadio() was solved (labels can be clicked now)
– P4A_Rmdir_Recursive() global function was added
– P4A_Data_Field::setSequence() method does not add the “_seq” postfix anymore
– P4A_DB::nextSequenceId() method adds the “_seq” postfix depending on the db you’re using
– SQL dump for PostgreSQL was added to products_catalogue sample
– products_catalogue’ SQL dump for MySQL was renamed to db_dump_mysql.sql
– P4A_Quote_SQL_Value() global function was removed
– P4A_DB::quote() method was added (it’s a wrapper for Zend_DB quote method)
– P4A_DB::get*(), fetch*(), query*() methods now support the binding params array
– P4A_ROOT_PATH autodetection rules were changed a bit for Windows server compatibility
– P4A_Strip_Double_Backslashes() global function was added
– P4A_UPLOADS_DIR autodetection rules were changed a bit for Windows server compatibility
– P4A_Fieldset’s label’s CSS was changed for Safari 3.1 compatibility
– P4A_Label’s CSS was changes a bit for cross-browser compatibility
– P4A_Field::getasText()’s CSS now has a default width (150px)
– a bug with P4A_I18N::mergeTranslation() method was solved
– FCKEditor was updated to 2.6
– jQuery::UI::datepicker was updated to 3.4.3
– javascript/css lazy loading was implemented, all widget depending js/css area loaded
only when loosing a lot of KB on first run
– print CSS was removed
– translations were synched
– “Loading…” message can now be translated

Now you can Download P4A 2.99.9, please help us with translations and report us all the bugs you find! Thank you so much!

PS: remember to keep your eyes on the P4A TV!

PPS: spread the word :-)

10 thoughts on “10th preview for P4A 3, major upgrades and optimizations

  1. brake_c

    Search does not work in product_catalogue app nor in my own app since 2.99.9 but it worked in previous versions. Seems like extra mysql_real_escape_string() or similar function call added.

    Error message when searsh string was “model 1”:
    SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘model 1’%’) )) p4a_count’ at line 3
    File: Pdo.php, Line: 238

  2. blas

    Fabrizio,

    Just a comment about customization of P4A_UPLOADS directories.

    Considering that in the app index.php file you can “predefine” severals P4A_UPLOADS directories, I think that other directories “depending” of the first ones and that is not possible “predefine” in the index.php must use the values of “parents” directories….

    I’m sorry but, may be, it is a little confuse my explanation. I will try with this sample: My docs roots directory is /wwwroot but I define P4A_UPLOADS_DIR as “/myapp/uploads” the ‘P4A_UPLOADS_TMP_DIR’ configuration setting must be like P4A_UPLOADS_DIR._DS_.P4A_UPLOADS_TMP_NAME (instead P4A_SERVER_DIR . P4A_UPLOADS_TMP_PATH)

    Thanks for reading this comment and for all your great work !!!

    blas

  3. Fabrizio Balliano Post author

    @blas: at the moment this is the code:

    define(‘P4A_UPLOADS_TMP_NAME’, ‘tmp’);
    define(‘P4A_UPLOADS_TMP_PATH’, P4A_UPLOADS_PATH . ‘/’ . P4A_UPLOADS_TMP_NAME);
    define(‘P4A_UPLOADS_TMP_DIR’, P4A_SERVER_DIR . P4A_UPLOADS_TMP_PATH);
    define(‘P4A_UPLOADS_TMP_URL’, P4A_SERVER_URL . P4A_UPLOADS_TMP_PATH);

    and I think it’s quite good, normally you only define tha p4a_uploads_path and not the dir, if you’ve to define the dir, simply define both path and dir and everything should be ok, otherwise it’s really difficult to generate configs and we can’t make the constants generation the most comlex part of p4a ;-)

  4. blas

    Fabrizio,

    Probably your are right. I have something misundestand and the problem is due because my app is not “under” the documents root dir… I configure all needed constants pointing to /var/myapp instead /wwwroot dir but when checkconfiguration occurs the /wwwroot/myapp/uploads/tmp directory is created ! instead /myapp/uploads/tmp.

    Thank for your answer. I will check my config.

    blas

  5. mary

    I probe the sample products_catalogue in firefox 2.0.0.14 and it shows the follow error:

    Fatal error: Call to a member function getTranslationList() on a non-object in C:\wwwroot\p4a\p4a\objects\p4a.php on line 841

    but in IE amd safari works fine

Leave a Reply

Your email address will not be published. Required fields are marked *