Skip to content

ValueError: Path cannot be empty #48

@s0rin

Description

@s0rin

Setup

  • SMW version: SemanticMediaWiki 4.2.0 (Semantic Bundle 6.1)
  • MW version: 1.43
  • PHP version: 8.1.32
  • DB system (MySQL, Blazegraph, etc.) and version: MySQL 8.4.5

This setup (excerpted from LocalSettings.php) has worked in MW 1.39:

$wgSearchType = 'SMWSearch';
$elasticSearchHost = 'elasticsearch7';
$elasticSearchPort = 9200;
$elasticSearchScheme = 'http';
$smwgFallbackSearchType = null; // default

// The two next parameters are recommended to highlight excerpts
$smwgElasticsearchConfig['query']['highlight.fragment']['type'] = 'plain';
$smwgElasticsearchConfig['indexer']['raw.text'] = true;
// Enable the Elasticsearch store
$smwgDefaultStore = 'SMW\Elastic\ElasticStore';
$smwgElasticsearchEndpoints = [
        [ 'host' => $elasticSearchHost,
          'port' => $elasticSearchPort,
          'scheme' => $elasticSearchScheme ]
];

Issue

After fixing manually the deprecation errors (see #6130 and steps 1-3 & 12) the following error occurs during update script:

# php maintenance/run.php update.php --quick
...
[e9811c7d0e66d861fdcc244e] [no req]   ValueError: Path cannot be empty
Backtrace:
from /var/www/html/extensions/SemanticMediaWiki/src/Elastic/Connection/Client.php(137)
#0 /var/www/html/extensions/SemanticMediaWiki/src/Elastic/Connection/Client.php(137): file_get_contents(string)
#1 /var/www/html/extensions/SemanticMediaWiki/src/Elastic/Connection/Client.php(319): SMW\Elastic\Connection\Client->getIndexDefinition(string)
#2 /var/www/html/extensions/SemanticMediaWiki/src/Elastic/Indexer/Rebuilder/Rollover.php(120): SMW\Elastic\Connection\Client->createIndex(string)
#3 /var/www/html/extensions/SemanticMediaWiki/src/Elastic/Installer.php(54): SMW\Elastic\Indexer\Rebuilder\Rollover->update(string)
#4 /var/www/html/extensions/SemanticMediaWiki/src/Elastic/ElasticStore.php(328): SMW\Elastic\Installer->setup()
#5 /var/www/html/extensions/SemanticMediaWiki/src/Store.php(490): SMW\Elastic\ElasticStore->setup(SMW\Options)
#6 /var/www/html/includes/installer/DatabaseUpdater.php(595): SMW\Store::setupStore(bool, SMW\Options)
#7 /var/www/html/includes/installer/DatabaseUpdater.php(552): MediaWiki\Installer\DatabaseUpdater->runUpdates(array, bool)
#8 /var/www/html/maintenance/update.php(195): MediaWiki\Installer\DatabaseUpdater->doUpdates(array)
#9 /var/www/html/maintenance/includes/MaintenanceRunner.php(703): UpdateMediaWiki->execute()
#10 /var/www/html/maintenance/run.php(51): MediaWiki\Maintenance\MaintenanceRunner->run()
#11 {main}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions