Skip to content

Test ALL terms inside terms fails with traceback #192

@txwikinger

Description

@txwikinger

Describe the bug
When using test all terms inside the terms page, an error message and tracback is shown

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'terms' inside the Multiaction section
  2. Click on the multi-selection box titled 'All n Terms' -> Test ALL terms
  3. See error

Fatal Error: do_test_test.php called with wrong parameters

Backtrace:

#0 /var/www/html/lwt/inc/session_utility.php(782): my_die('...')
#1 /var/www/html/lwt/inc/session_utility.php(802): do_test_test_get_projection('...', Array)
#2 /var/www/html/lwt/do_test.php(62): do_test_test_from_selection(2, '...')
#3 /var/www/html/lwt/do_test.php(187): get_l2_language_name()
#4 /var/www/html/lwt/do_test.php(260): do_test_desktop_page()
#5 /var/www/html/lwt/do_test.php(277): do_test_page('...')
#6 /var/www/html/lwt/do_test.php(285): try_start_test('...')
Signal this issue on GitHub or Discord.

Expected behavior
I can to the testing pages for the terms

Screenshots
If applicable, add screenshots to help explain your problem.

Server (please complete)
You can copy/paste data from http://[.. your LWT installation]/server_data.php.

* @license Unlicense * @link https://hugofara.github.io/lwt/docs/php/files/index.html * @SInCE 2.7.0 */ namespace Lwt\Interface\Server\Data; require_once 'inc/session_utility.php'; /** * Return a lot of different server state variables. * * @return (false|float|string)[] {"db_prefix": string, "db_size": float, "server_soft": string[], * "apache": string, "php": string, "mysql": string} * Table prefix, database size, server software, apache version, PHP version, MySQL * version * * @global string $tbpref Database table prefix * @global string $dbname Database name * * @psalm-return array{db_name: string, db_prefix: string, db_size: float, server_soft: string, apache: string, php: false|string, mysql: string} */ function get_server_data_table(): array { global $tbpref, $dbname; $dbaccess_format = convert_string_to_sqlsyntax($dbname); $data_table = array(); $data_table["db_name"] = $dbname; $data_table["db_prefix"] = $tbpref; $temp_size = get_first_value( "SELECT ROUND(SUM(data_length+index_length)/1024/1024, 1) AS value FROM information_schema.TABLES WHERE table_schema = $dbaccess_format AND table_name IN ( '{$tbpref}archivedtexts', '{$tbpref}archtexttags', '{$tbpref}feedlinks', '{$tbpref}languages', '{$tbpref}newsfeeds', '{$tbpref}sentences', '{$tbpref}settings', '{$tbpref}tags', '{$tbpref}tags2', '{$tbpref}textitems2', '{$tbpref}texts', '{$tbpref}texttags', '{$tbpref}words', '{$tbpref}wordtags' )" ); if ($temp_size === null) { $data_table["db_size"] = 0.0; } else { $data_table["db_size"] = floatval($temp_size); } $data_table["server_soft"] = $_SERVER['SERVER_SOFTWARE']; $data_table["apache"] = "Apache/?"; if (str_starts_with($data_table["server_soft"], "Apache/")) { $temp_soft = explode(' ', $data_table["server_soft"]); $data_table["apache"] = $temp_soft[0]; } $data_table["php"] = phpversion(); $data_table["mysql"] = (string)get_first_value("SELECT VERSION() AS value"); return $data_table; } /** * Display the main content for the page. * * @return void */ function display_content(): void { $data = get_server_data_table(); pagestart("Server Data", true); ?>

Server

Data Value
LWT version
Web Server
Server Software
Server Location
PHP Version

Database

Data Value
Database name
Database prefix (surrounded by "") ""
Database Size MB
MySQL Version

Client API

Data Value
REST API Version
REST API Release date
<script type="text/javascript"> function handle_api_version_answer(data) { if ("error" in data) { $("#rest-api-version").text( "Error while getting data from the REST API!" + "\nMessage: " + data.error ); $("#rest-api-release-date").empty(); } else { $("#rest-api-version").text(data.version); $("#rest-api-release-date").text(data.release_date); } }
$.getJSON(
    "api.php/v1/version",
    {},
    handle_api_version_answer
);
</script> display_content();

  • LWT version: [e.g. 2.8.0]
    Use docker install (master branch ) on Feb 18 2024

Desktop (if necessary):

  • OS: [e.g. iOS] ChromeOS
  • Browser [e.g. chrome, safari] Chrome
  • Version [e.g. 22] 119

Smartphone (if necessary):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions