Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0.2
    • Component/s: Database SQL/XMLDB, RSS
    • Labels:
    • Environment:
      Windows Server 2003, IIS 6, MSSQL
    • Database:
      Microsoft SQL
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE
    • Rank:
      16522

      Description

      Having added RSS feeds at the site level, on trying to add them to an RSS block, there's an error (shown below).

      The issue is that title is an ntext block, and it can't be used with the order by clause. Locally, i've just cast title to nvarchar in the query, around

      line 56 of \blocks\rss_client\edit_form.php

      but that's not a fix-- I don't yet understand the db stuff enough to offer a real fix.

      Message: [Microsoft][SQL Server Native Client 10.0][SQL Server]The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.<br>

      SELECT id, CASE WHEN preferredtitle = N'' THEN title ELSE preferredtitle END AS acutaltitle
      FROM bhi_block_rss_client
      WHERE userid = '2' OR shared = 1
      ORDER BY acutaltitle
      [array (
      0 => '',
      1 => '2',
      )]
      Stack trace:
      line 391 of \lib\dml\moodle_database.php: dml_read_exception thrown
      line 252 of \lib\dml\sqlsrv_native_moodle_database.php: call to moodle_database->query_end()
      line 363 of \lib\dml\sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->query_end()
      line 761 of \lib\dml\sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->do_query()
      line 838 of \lib\dml\sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->get_recordset_sql()
      line 1183 of \lib\dml\moodle_database.php: call to sqlsrv_native_moodle_database->get_records_sql()
      line 56 of \blocks\rss_client\edit_form.php: call to moodle_database->get_records_sql_menu()
      line 65 of \blocks\edit_form.php: call to block_rss_client_edit_form->specific_definition()
      line 152 of \lib\formslib.php: call to block_edit_form->definition()
      line 58 of \blocks\edit_form.php: call to moodleform->moodleform()
      line 1166 of \lib\blocklib.php: call to block_edit_form->__construct()
      line 1027 of \lib\blocklib.php: call to block_manager->process_url_edit()
      line 1178 of \lib\pagelib.php: call to block_manager->process_url_actions()
      line 702 of \lib\pagelib.php: call to moodle_page->starting_output()
      line 580 of \lib\outputrenderers.php: call to moodle_page->set_state()
      line ? of unknownfile: call to core_renderer->header()
      line 1200 of \lib\setuplib.php: call to call_user_func_array()
      line ? of unknownfile: call to bootstrap_renderer->__call()
      line 89 of \index.php: call to bootstrap_renderer->heade

        Activity

        Hide
        Eloy Lafuente (stronk7) added a comment -

        NOTE: This issue was assigned to the STABLE backlog without complete triaging process. Marking it as triaged, but with this note for future reference.

        Show
        Eloy Lafuente (stronk7) added a comment - NOTE: This issue was assigned to the STABLE backlog without complete triaging process. Marking it as triaged, but with this note for future reference.
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Raising to critical and assigning to me.

        Show
        Eloy Lafuente (stronk7) added a comment - Raising to critical and assigning to me.
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Resolving this as fixed. Has been requested for integration by PULL-281

        Thanks for the report and ciao

        Show
        Eloy Lafuente (stronk7) added a comment - Resolving this as fixed. Has been requested for integration by PULL-281 Thanks for the report and ciao

          People

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

            Dates

            • Created:
              Updated:
              Resolved: