Jump to content

Michael Lenaghan

Members
  • Posts

    40
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Michael Lenaghan

  1. I logged an issue for this: https://github.com/processwire/processwire-issues/issues/1908 Take another look at the `textarea` element: <textarea ... name="body" ... required="required" ... style="display: none;"></textarea> It's marked `required`, but it's also marked `display: none`. TinyMCE fields have a complex structure, and that complex structure is preventing the `required` attribute code from working correctly. Ultimately, TinyMCE fields shouldn't let users check the "Also use HTML5 "required" attribute?" option.
  2. OK, I think I found the problem; you can't set "Also use HTML5 "required" attribute?" on a TinyMCE-based `textarea` field. In other words, don't check this box:
  3. That error was in Safari. I'm seeing the same error in Chrome. In Firefox, I'm seeing the same error, and it's followed by many more, e.g.: An invalid form control is not focusable. The invalid form control with name=‘whats[]’ is not focusable. The invalid form control with name=‘_whats_add_items’ is not focusable. So: not a browser-specific issue.
  4. I'm having frequent problems saving pages in a brand-new ProcessWire site I'm creating. (I'm using ProcessWire 3.0.227.) The problem is that I fill out the page, hit either "Publish" or "Save + Keep Unpublished" — and nothing happens. Specifically: the page isn't saved. And no message is shown. Looking in the JavaScript console, I see this error: An invalid form control with name='body' is not focusable. Looking through the HTML, I do in fact see a control with that name: <textarea class="FieldtypeTextarea required uk-textarea InputfieldTinyMCEEditor InputfieldTinyMCENormal InputfieldMaxWidth InputfieldTinyMCELoaded" id="Inputfield_body" name="body" rows="15" required="required" aria-hidden="true" style="display: none;"></textarea> But the error message isn't saying that a control doesn't exist, it's saying that it's "invalid" and/or "not focusable." I'll keep trying to figure out what's happening, but if you have any ideas, please let me know!
  5. I created a `Fieldset (Page)` field with two fields, a start year and an end year. Is there some way to add validation that guarantees start year <= end year? (If, that is, they're specified at all; both fields should be optional.)
  6. Thanks. And sorry; I should have done a better job of searching. Increasing memory_limit to 256M allowed me to add the ~48MB file. Increasing it to 384MB allowed me to add the ~88MB file. For posterity: When the limit was 128M there were errors in the Apache error log. When it was 256M there were no errors, but the ~88MB file didn't quite finish uploading.
  7. I'm converting a Drupal site that has many mp3 files. Two of those files are a bit large; one is ~48MB and the other is ~88MB. At first they wouldn't upload at all; ProcessWire said that they were larger than the 40MB upload limit. I changed two entries in php.ini: post_max_size = 100M upload_max_filesize = 100M After that ProcessWire seemed to upload the files--but after uploading they always disappear. In other words, I drag the files, I see the upload progress bar, the upload completes (i.e., hits 100%), I hit Save--and the files disappear from the list. What am I missing?
  8. If anyone else is looking for a quick fix pending a final fix, this is also an issue: /** * Initialize the date/time inputfield * */ public function init() { ... $this->set('dateInputFormat', self::defaultDateInputFormat); $this->set('timeInputFormat', ''); ... If both instances of self::defaultDateInputFormat are replaced with '', or if the value of the const self::defaultDateInputFormat is replaced with '', time-only fields work as expected (and date-only and datetime fields are unaffected).
  9. Soma, I understand that a datetime field will always have both a date and time. It doesn't mean that we care about the date or time portion though. So just as we can input and format a datetime to accept and show only the date we should be able to input and format a datetime to accept and show only the time. Clearly that's the intent; otherwise why would None be listed among the options? It would probably simplify things if Date and Time were separate field types. Then dates would *always* have a date format, and times would *always* have a time format, and datetimes would *always* have a datetime format. That would simplify other things too; for example, the datetime picker doesn't support time-only picking, so it wouldn't be a time field option.
  10. OK, I think I've found the problem. Take a look at InputfieldDatetime.module. /** * Date/time Inputfield configuration, per field * */ public function ___getConfigInputfields() { ... $f->attr('value', $this->dateInputFormat ? $this->dateInputFormat : self::defaultDateInputFormat); ... $f->attr('value', $this->timeInputFormat ? $this->timeInputFormat : ''); ...
  11. Filling in some additional details... I'm using the latest version of ProcessWire (2.4.0). The Date Output Format is "None", the Time Output Format is "5:10 PM". The Date Picker is "No date/time picker". The Date Input Format is "2012-04-08" (that's the problem), the Time Input Format is "5:10 PM". *** If I enter a time like "9:00 AM" then after Save it becomes "2014-04-22 9:00 AM". *** If I set Date Input Format Code to an empty string and Save, the Date Input Format reverts to "2012-04-08". If I set Date Input Format Code to some value like "''" then that value shows up in the input string.
  12. Is it possible to create a time-only field? In other words, is it possible to use a datetime field in such a way that it doesn't allow date entry? Here's the use case. I'm trying to create a template for "events". Events have a start date and end date, and an optional start time and end time. The start and end times are only enabled and required if a separate "All Day" checkbox isn't set. Here's the problem. I've set a Time Input Format, but I can't set the Date Input Format to None. None is a value in the drop-down, but when I select it and Save it just reverts to a default format.
×
×
  • Create New...