Joomla update on a write-protected file: Skipped, error'ed, or something else?

12 views
Skip to first unread message

Marvin_Martiano

unread,
Sep 16, 2017, 11:24:00 AM9/16/17
to Joomla! General Development
Question 1a: Does "Update" re-write ALL core files each time, or only those that have changed? I thought all got replaced, but thinking of it now that seems like time-wasting and (theoretically) possibly introducing write-errors.

Actual Question 1: What happens if Joomla during updating encounters a file that has its permissions set to read-only for everybody (chmod a-wx, so permissions are 444)? Will this cause an error, will it just skip this file, or will something else happen?

Background: My actual need is for an extra field in the registration form (separate first- and surnames for sorting; separating them after the fact is hopelessly manual work --- surnames as well as firstnames can have multiple parts). To install the MVCoverride plugin (unupdated for a year or more, development abandoned according to its Github page) seems overkill / more risk than reward.

Alternatively, to add it as a custom field then rewrite the layout so it appears in the first set of data ("name" becoming "first name", then the inserted "surname", then "username", "password", "email"; and remove the separator to the fieldset of custom fields IF no other custom fields) seems a bit clumsy as well --- I don't want to hard-code what custom fields there are; the loop I wrote checking each item to put before/after the next fieldset seems inefficient too (or would you call that negligible?).

So my plan was to just add a field in [root]/components/com_users/models/forms/registration.xml AND in .../profile.xml. Those two files look quite future-proof in any case, unchanged since Joomla 2.5; what remains after inserting an extra field (either "firstname" or "surname") is to override the language file and change "COM_USERS_REGISTER_NAME_LABEL" from (EN-gb) "name" to respectively either "surname" or "firstname", so that's "the right way" to do that part.  Now I want this change to be permanent (not to have to re-put that file after every incremental update, say 3.7.5-->3.7.6 any day now for some minor bugfix): Can I do that by making it write-protected? Consequences I'm overlooking?

I had a more far-fetched plan in my head where a cron deamon looks for a self-written comment in that file twice a day; if overwritten by an update I get emailed hopefully before somebody registers themselves (pending activation by me) without first/surname separated.
Reply all
Reply to author
Forward
0 new messages