Currently, when on the Edgesense script configuration screen (/admin/edgesense/script-param) and unticking the "Run During Cron" tickbox, the values of the "Users", "Nodes" and "Comments" fields below will change from a path to a URL, with the edgesense_views_key GET parameter appended.
The same effect can be achieved when the "Run During Cron" tickbox is initially unticked, by ticking and immediately unticking it again without saving the form.
The reason for this behaviour seems to be to prevent the combination of "Run During Cron: No" and using paths to the edgesense_*.json files, because that will fail to regenerate the JSON data (see #102). However, the user can still achieve that combination by changing the field values for "Users", "Nodes" and "Comments" back to paths after unticking the "Run During Cron" box, and then saving. So it is not an effective (but very confusing) countermeasure.
Proposal: Instead of doing any "autocorrect", fail on form validation, informing the user that URLs have to be used when "Run During Cron: No" is configured. While we're at it, also fail when the URLs do not contain the required appended GET parameter.
Currently, when on the Edgesense script configuration screen (
/admin/edgesense/script-param) and unticking the "Run During Cron" tickbox, the values of the "Users", "Nodes" and "Comments" fields below will change from a path to a URL, with theedgesense_views_keyGET parameter appended.The same effect can be achieved when the "Run During Cron" tickbox is initially unticked, by ticking and immediately unticking it again without saving the form.
The reason for this behaviour seems to be to prevent the combination of "Run During Cron: No" and using paths to the
edgesense_*.jsonfiles, because that will fail to regenerate the JSON data (see #102). However, the user can still achieve that combination by changing the field values for "Users", "Nodes" and "Comments" back to paths after unticking the "Run During Cron" box, and then saving. So it is not an effective (but very confusing) countermeasure.Proposal: Instead of doing any "autocorrect", fail on form validation, informing the user that URLs have to be used when "Run During Cron: No" is configured. While we're at it, also fail when the URLs do not contain the required appended GET parameter.