Acf-core-0.15 Release Notes

From Alpine Linux

For the 0.15 release, found in Alpine Linux 2.5, acf-core had some significant changes that required changes to each and every ACF package. If you have created custom ACF packages for your use, you must make corresponding changes for your code to work on Alpine Linux 2.5.

Related bugs / feature requests


The major purpose for the changes in acf-core-0.15 was to make a cleaner separation between ACF functionality and the web (www) interface. ACF already included acf_www-controller.lua and acf_cli-controller.lua files, ostensibly to allow the web interface and client interface to separate out their functionality. However, in practice, the www-specific code was scattered everywhere. This separation allows ACF to be used by Lua code as a library and makes an enhanced cli application possible.


  • Reorganized mvc.lua and the acf_www and acf_cli controllers to move www-specific things from mvc to acf_www, and visa versa
    • Templates, skins, and user permissions are www-specific, whereas html output is not
    • Removed controllerfunctions.lua and moved the handle_form and handle_clientdata functions into mvc.lua with overridden versions in acf_www and acf_cli
    • Updated controllers to remove redirect_to_referrer references
  • Changed forms to always use 'submit' as the name of the submit button, plus allow multiple submit buttons
    • Changed startstop to be a standard form by creating two model functions and deleting the special controller function
    • Changed handle_form to pass self, clientdata, and action into get_function and self into set_function
  • Added auto_view functionality for html, json, stream, and serialized viewtype
    • Renamed ajax viewtype to json to be more accurate
    • Templates (for www) now receive a viewfunc, rather than using viewfile
    • Actions without views with viewtype of html, json, stream, or serialized will now be displayed using standard code.
    • Allowed viewtype override in clientdata in mvc
  • Removed access to the public APP variable
    • Required modelfunctions.lua setfiledetails and write_file_with_audit to take self parameter
  • Moved viewfunctions.lua to htmlviewfunctions.lua and made it an actual module
  • Removed the public variable auth from authenticator.lua and replaced it with get_subauth function
  • Added option to have skin-specific javascript and/or template in skindir
  • Added clientdata.skinned option to turn off skins in html template

Necessary Changes for Custom ACFs

Following is a list of the changes necessary for custom ACF packages to work with acf-core-0.15. The best way to understand the changes is to look at the changes made to ACF packages in the public git repo. If you have further questions, you can use the ACF mailing list.


  • Remove all viewfunctions references and replace with htmlviewfunctions (likely need to add references as it is now a module).
  • Custom forms must now name the submit button "submit" rather than with the label value.
  • Add 'html = require("acf.html")' if using html library.
  • Many views may be deleted and handled by the auto_view functionality
    • Common things like readonly, password or hidden type, and field order may now be configured in the model get_function.


  • Remove all controllerfunctions references and replace with self.
  • Startstop is now handled as a standard form.
  • Remove all self:redirect_to_referrer references and replace with self.handle_form. This will also mean rewriting the corresponding model function to change to two functions creating and using a form.
  • Modify any custom handle_form get or set functions to accept self as the first parameter (they may also be removed and implemented in the model).
  • Remove code that sets viewtype, as this can now be set directly by the user.


  • Form get_function and set_function now receive different parameters: get_function(self, clientdata, action) set_function(self, form)
  • Replace startstop_service with two functions to now handle as standard form.
  • modelfunctions.setfiledetails now takes self as the first parameter