ERRO AO LER A BASE DE DADOS

ERRO AO LER A BASE DE DADOS

por Cleiton Luiz de Sá -
Número de respostas: 2
Quando tento acessar alguns cursos, apresenta a seguinte informação: ERRO AO LER A BASE DE DADOS. Ativei o debug e aparece a seguinte mensagem:


Context id 563 does not have valid path, please use context_helper::build_all_paths()
  • line 481 of /lib/accesslib.php: call to debugging()
  • line 553 of /lib/accesslib.php: call to has_capability()
  • line 823 of /course/lib.php: call to has_any_capability()
  • line 1635 of /course/renderer.php: call to can_edit_in_category()
  • line 66 of /course/index.php: call to core_course_renderer->course_category()
Context id 563 does not have valid path, please use context_helper::build_all_paths()
  • line 481 of /lib/accesslib.php: call to debugging()
  • line 1720 of /course/renderer.php: call to has_capability()
  • line 66 of /course/index.php: call to core_course_renderer->course_category()


Erro ao ler a base de dados



Debug info: SQLState: 42000<br>
Error Code: 102<br>
Message: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Sintaxe incorreta próxima a ')'.<br>

SELECT active.filter, fc.name, fc.value
FROM (SELECT f.filter, MAX(f.sortorder) AS sortorder
FROM mdl_filter_active f
JOIN mdl_context ctx ON f.contextid = ctx.id
WHERE ctx.id IN ()
GROUP BY filter
HAVING MAX(f.active * ctx.depth) > -MIN(f.active * ctx.depth)
) active
LEFT JOIN mdl_filter_config fc ON fc.filter = active.filter AND fc.contextid = 563
ORDER BY active.sortorder
[array (
)]
Error code: dmlreadexception
Stack trace:
  • line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown
  • line 324 of /lib/dml/sqlsrv_native_moodle_database.php: call to moodle_database->query_end()
  • line 431 of /lib/dml/sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->query_end()
  • line 896 of /lib/dml/sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->do_query()
  • line 979 of /lib/filterlib.php: call to sqlsrv_native_moodle_database->get_recordset_sql()
  • line 122 of /lib/filterlib.php: call to filter_get_active_in_context()
  • line 189 of /lib/filterlib.php: call to filter_manager->load_filters()
  • line 259 of /lib/filterlib.php: call to filter_manager->get_text_filters()
  • line 1264 of /lib/weblib.php: call to filter_manager->setup_page_for_filters()
  • line 153 of /theme/clean/lib.php: call to format_text()
  • line 32 of /theme/clean/layout/columns3.php: call to theme_clean_get_html_for_settings()
  • line 1287 of /lib/outputrenderers.php: call to include()
  • line 1217 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
  • line 68 of /course/index.php: call to core_renderer->header()

Alguém pode me ajudar?

Contagem das avaliações:  -
Em resposta à Cleiton Luiz de Sá

Re: ERRO AO LER A BASE DE DADOS

por Eduardo Henrique Lima -

Olá, Cleiton, tudo bem?

Também estou com esse problema, conseguiu resolver?


Contagem das avaliações:  -
Em resposta à Eduardo Henrique Lima

Re: ERRO AO LER A BASE DE DADOS

por Victor Kindinger -

Olá, Eduardo.

Na documentação do Moodle sobre este erro diz que é bom fazer uma verificação na sua base de dados por corrupções.

Aí, ir no seu servidor e criar em /admin um arquivo com o nome rebuildcontextpaths.php e colocar o seguinte conteúdo para ele:

<?php
require_once(dirname(__FILE__) . '/../config.php');
 
require_login();
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM));
 
$strRebuildContextPath = "Rebuild Context Path";
 
$PAGE->set_url('/admin/rebuildcontexpath.php');
$PAGE->set_title($strRebuildContextPath);
$PAGE->set_heading($strRebuildContextPath);
$PAGE->navbar->add($strRebuildContextPath);
 
echo $OUTPUT->header();
echo '<p>Rebuilding context paths ...</p>';
build_context_path(true);
echo '<p>Done</p>';
echo $OUTPUT->footer();
?>

Substituindo __FILE__ pelo caminho raiz do seu Moodle.

Aí acessar https://SEUSITE.com.br/moodle/admin/rebuildcontextpaths.php para fazer o processo de reconstrução dos caminhos.

Segue a documentação para dar uma olhada: https://docs.moodle.org/36/en/How_to_rebuild_context_paths

Contagem das avaliações:  -