• Sub-task
    • Resolution: Fixed
    • Critical
    • 2.0.2
    • 2.0
    • Database SQL/XMLDB, RSS
    • Windows Server 2003, IIS 6, MSSQL
    • Microsoft SQL
    • Easy


      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




            stronk7 Eloy Lafuente (stronk7)
            eclectics Gregor McNish
            Aparup Banerjee Aparup Banerjee
            0 Vote for this issue
            1 Start watching this issue




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