Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-66386

Database entry tags problem.

    • MOODLE_310_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
    • MDL-66386-master
    • Hide

      Set the add template to the database activity.

      Show
      Set the add template to the database activity.
    • Easy
    • Hide
      1. Create a new database.
      2. Add a date field named "date" and description "date".
      3. Add a new entry with random date and assign a tag named TAGNAME.
      4. Add the tag block to the course.
      5. Click on the tag you added on step3 (TAGNAME).
      6. URL should be something like: /tag/index.php?tc=1&tag=TAGNAME
      7. Check the entry you've added on step 3 is shown.
      8. Check the entry title is a well formatted date.
      9. Enter the database again.
      10. Click on the Search tab and check no PHP warning is shown.

      Test search filtering problem

      1. On the same course add a new glossary.
      2. Add a new entry with title "a" and random description.
      3. Check or enable filter Glossary auto-linking.
      4. Enter the database again and navigate to the "Search" tab.
      5. Check all search fields are displayed correctly. (Before the patch it displays something like the following lines with letters "a" linked to the glossary, which is incorrect)
        Tags: ##tags##
        Author first name: ##firstname##
        Author surname: ##lastname##
      Show
      Create a new database. Add a date field named "date" and description "date". Add a new entry with random date and assign a tag named TAGNAME. Add the tag block to the course. Click on the tag you added on step3 (TAGNAME). URL should be something like: /tag/index.php?tc=1&tag=TAGNAME Check the entry you've added on step 3 is shown. Check the entry title is a well formatted date. Enter the database again. Click on the Search tab and check no PHP warning is shown. Test search filtering problem On the same course add a new glossary. Add a new entry with title "a" and random description. Check or enable filter Glossary auto-linking. Enter the database again and navigate to the "Search" tab. Check all search fields are displayed correctly. (Before the patch it displays something like the following lines with letters "a" linked to the glossary, which is incorrect) Tags: ##tags## Author first name: ##firstname## Author surname: ##lastname##

      To reproduce, follow those exact steps on the testing instructions, on step 7 an error will be raised.

      The error is raised because the database cannot determine which field use as a title on the database.
       

      Notice:  Trying to get property of non-object in /mod/data/locallib.php on line 1004
       
      Warning:  
      require_once(/mod/data/field//field.class.php):
       failed to open stream: No such file or directory in /mod/data/locallib.php on line 1004
       
       
      Fatal error:  require_once(): Failed opening required 
      '/mod/data/field//field.class.php'
       
      (include_path='/lib/pear:.:/usr/local/Cellar/php@7.1/7.1.22/share/php@7.1/pear')
       in /mod/data/locallib.php on line 1004 

       

      On mod_data_get_tagged_records function calls data_get_tag_title_field but no return is done. So when calling data_get_tag_title_for_entry and error is raised.

      To solve that I think it should check if data_get_tag_title_field returns empty and have a default or none $pagename when this happens.

            pferre22 Pau Ferrer
            pferre22 Pau Ferrer
            Ferran Recio Ferran Recio
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 6 hours, 25 minutes
                6h 25m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.