Jump to content

PW 3.0.22: Several upgrades and optimizations


ryan
 Share

Recommended Posts

This week we have some nice optimizations and enhancements for the core, as well as some great upgrades in the forums! Our Inputfield forms (including page editor) got a whole lot faster, and our Password field got a ton of nice enhancements. These updates are all available in version 2.8.22 as well. 

https://processwire.com/blog/posts/upgrades-optimizations-pw-3.0.22/

  • Like 14
Link to comment
Share on other sites

The performance improvement for Inputfield forms sounds incredible. Looking froward to testing that out. The largest number I have to test with is about 60. It was never "slow" before, but it was slower than other templates with 5-10. Great work as always Ryan!

  • Like 3
Link to comment
Share on other sites

Thanks as always for this!

One problem though that I encountered was that the new version (.22) broke my custom inputfield (InputfieldSelectize), the inputfield seemed to no longer save or load the strings that define the array and option/items markup and then that caused all pages using that to break.

is there something that would prevent either storing or loading data into those settings fields (??)

Update:

The module config data (for each field) is saved to the database, but is not being loaded into the field editor fields when the page renders.
This happens on the following modules tested so far:

  • Inputfield Chosen Select
  • Inputfield Selectize
  • Selectize Template & Field Tags

if anyone has any clues how to fix this, would be appreciated! I spent some time to look at this but sort of striking out at this stage...

  • Like 1
Link to comment
Share on other sites

Macrura, looking in InputfieldSelectize.module, I think the issue might potentially be that there are no default values established for the configuration properties. For instance, there is no $this->set('itemDataArray', array()); in the __construct() method. Though if something was working before, and stopped working after this upgrade, then I'd rather continue making it work than have existing modules have to make changes.

I'm wondering if this change might be the culprit? Can you try changing it back to the previous setting to see if it makes any difference in your case?

https://github.com/ryancramerdesign/ProcessWire/commit/132ea079f79c574dd39a4a7ca37bd852259e217a#diff-581dc8ba34896b025170325efb07ec90L789

If this is the issue (?), I can think of some other ways to approach this that should resolve it. If that's not the issue, please let me know too and I can continue hunting for it. 

Link to comment
Share on other sites

Macrura, great–glad that was it! I've updated the core Field.php file so that this should no longer be an issue:

https://github.com/ryancramerdesign/ProcessWire/commit/c0b30dbb24d30845d98ab1c9d103bbead1a6e629

Still a good idea to define defaults for your module though. If you don't, there's a good chance the module will not work if someone creates a field and neglects to change any settings (and thus never saves any config data).

  • Like 2
Link to comment
Share on other sites

Cool - thanks!

i seem to be clueless on how to do this default data but will check out some other modules and see if i can hack it...

in terms of the InputfieldSelectize i think it will be good though to provide the base code to select pages using their title only so then as you say the inputfield will at least be usable out of the box.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...