Moodle
  1. Moodle
  2. MDL-27534

Viewing templates for database activity when list is empty generates error

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.0.3, 2.5.4, 2.6.1
    • Fix Version/s: STABLE backlog
    • Environment:
      Moodle running on CentOS LAMP server. Testing done on Fedora 13 using Chrome and Firefox.
    • Database:
      MySQL
    • Testing Instructions:
      Hide

      1. add new database activity to course
      2. Enter title, description, and use default settings.
      3. Hit Save and Display
      4. Add entry, select URL field, fill in form, click Add
      5. Click Templates tab and get error:
      Coding error detected, it must be fixed by a programmer: PHP catchable fatal error
      More information about this error [link to:
      http://docs.moodle.org/en/error/debug/codingerror]
      6. Go to Add Entry Tab
      7. Add entry for URL field and Save and view
      8. Go to templates, no error anymore

      Also, if I delete the single entry, the error does not come back as I expected.

      Show
      1. add new database activity to course 2. Enter title, description, and use default settings. 3. Hit Save and Display 4. Add entry, select URL field, fill in form, click Add 5. Click Templates tab and get error: Coding error detected, it must be fixed by a programmer: PHP catchable fatal error More information about this error [link to: http://docs.moodle.org/en/error/debug/codingerror ] 6. Go to Add Entry Tab 7. Add entry for URL field and Save and view 8. Go to templates, no error anymore Also, if I delete the single entry, the error does not come back as I expected.
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • Rank:
      17196

      Description

      When viewing the templates tab in the database activity with the database list empty, you get error that says:

      Coding error detected, it must be fixed by a programmer: PHP catchable fatal error
      More information about this error [link to:
      http://docs.moodle.org/en/error/debug/codingerror]

        Issue Links

          Activity

          Hide
          Felicia Berryman added a comment -

          My step #4 should say add 'Field' and not 'Entry.' Also, I think if you just click on the tab to enter an Entry and the go to the Templates, this error goes away too.

          Show
          Felicia Berryman added a comment - My step #4 should say add 'Field' and not 'Entry.' Also, I think if you just click on the tab to enter an Entry and the go to the Templates, this error goes away too.
          Hide
          Felicia Berryman added a comment -

          Another method to get to this error reported to me by a colleage:

          1. Created a Database activity using the default settings.
          2. I added a Text field called "Name" and a date field called "Date Added."
          3. I clicked "Add entry" and then entered some data.
          4. I clicked "Save and View", and then got the error that "Single template is not yet defined". If I click on "View List", then I get an error that "List template is not yet defined".

          However, if I click on "Templates" I get the coding error message, and then I can click on "View List" or "View Single" and they will work. Then if I click on Templates again, I do get a template I can edit.

          Show
          Felicia Berryman added a comment - Another method to get to this error reported to me by a colleage: 1. Created a Database activity using the default settings. 2. I added a Text field called "Name" and a date field called "Date Added." 3. I clicked "Add entry" and then entered some data. 4. I clicked "Save and View", and then got the error that "Single template is not yet defined". If I click on "View List", then I get an error that "List template is not yet defined". However, if I click on "Templates" I get the coding error message, and then I can click on "View List" or "View Single" and they will work. Then if I click on Templates again, I do get a template I can edit.
          Hide
          Michael de Raadt added a comment -

          Thanks for reporting this issue.

          We have detected that this issue has been inactive for over a year. It was reported as affecting versions that are no longer supported.

          If you believe that this issue is still relevant to current versions (2.5 and beyond), please comment on the issue. Issues left inactive for a further month will be closed.

          Michael d.

          TW9vZGxlDQo=

          Show
          Michael de Raadt added a comment - Thanks for reporting this issue. We have detected that this issue has been inactive for over a year. It was reported as affecting versions that are no longer supported. If you believe that this issue is still relevant to current versions (2.5 and beyond), please comment on the issue. Issues left inactive for a further month will be closed. Michael d. TW9vZGxlDQo=
          Hide
          Tim Lock added a comment -

          Hi Michael,

          This error still occurs on 2.5.x and demo.moodle.net as described. Please add to the DEV BACKLOG.

          Also mentioned in MDL-24597 and MDL-22163.

          Regards,
          Tim

          Show
          Tim Lock added a comment - Hi Michael, This error still occurs on 2.5.x and demo.moodle.net as described. Please add to the DEV BACKLOG. Also mentioned in MDL-24597 and MDL-22163 . Regards, Tim
          Hide
          Andrew Davis added a comment -

          I am not able to reproduce this in current master (2.7), 2.5.5 on my machine or on qa.moodle.net. Is anyone still experiencing this in 2.5.5 or later?

          Show
          Andrew Davis added a comment - I am not able to reproduce this in current master (2.7), 2.5.5 on my machine or on qa.moodle.net. Is anyone still experiencing this in 2.5.5 or later?

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated: