Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP Notice: Uninitialized string offset: 0 in DocumentCreator.php on line 309 #5640

Open
kghbln opened this issue May 19, 2024 · 0 comments
Open
Labels
bug Occurrence of an unintended or unanticipated behaviour that causes a vulnerability or fatal error store-elasticsearch

Comments

@kghbln
Copy link
Member

kghbln commented May 19, 2024

Setup

  • MediaWiki | 1.39.7 (64425c7)16:12, 15 May 2024
  • PHP | 7.4.33 (apache2handler)
  • MariaDB | 10.5.23-MariaDB-0+deb11u1
  • Elasticsearch | 7.10.2
  • Semantic MediaWiki 4.1.3

Issue

When running php SemanticMediaWiki/maintenance/rebuildElasticIndex.php I get the following notice:

PHP Notice:  Uninitialized string offset: 0 in /../w/extensions/SemanticMediaWiki/src/Elastic/Indexer/DocumentCreator.php on line 309

The script continues, though.

Semantic MediaWiki:                                                   4.1.3
MediaWiki:                                                           1.39.7

--- About -----------------------------------------------------------------

The script rebuilds the index from available property tables. Changes to
the index rules (e.g. altered stopwords, new stemmer etc.) or a newly added
(or altered) table requires to run this script again to ensure that the
index complies with the rules set forth by the SQL back-end or the
Elasticsearch field mapping.

--- Notice ----------------------------------------------------------------

The rebuild will use a rollover approach which means that while the new
index is created, the old index is still available and allows queries to
work even though the rebuild is ongoing. Once completed, a "rollover" will
switch the indices at which point the old indices are being removed. 

It should be noted that the replication is paused for the duration of the
rebuild to allow changes to pages and annotations to be processed after the
re-index has been completed therefore running the job scheduler is
obligatory.

Abort the rebuild with CTRL-C in ...                                    0 s

If for some reason the rebuild process is aborted, please make sure to run
`--update-settings` so that default settings can be recovered and set to
the default replication mode.

--- Indices rebuild -------------------------------------------------------

Rebuilding indices ...
   ... creating required indices and aliases ...                          ✓
   ... selected entities ...                                   12148 (rows)
   ... updating document (current/last) ...          252882 / 286872 ( 88%)PHP Notice:  Uninitialized string offset: 0 in /../w/extensions/SemanticMediaWiki/src/Elastic/Indexer/DocumentCreator.php on line 309
   ... updating document (current/last) ...          286872 / 286872 (100%)
   ... done.

Settings and mappings ...
   ... finding default settings ...                                       ✓
   ... data index ...
       ... rollover from v2 to v1 ...                                     ✓
       ... closing, reopening ...                                         ✓
   ... lookup index ...
       ... rollover from v2 to v1 ...                                     ✓
       ... closing, reopening ...                                         ✓
   ... refreshing indices ...                                             ✓
   ... done.

The --ignore-exceptionsflag to "rebuildData.php" was not working, thus, I had to restart rebuilding data with the -s flag manually.

@kghbln kghbln added bug Occurrence of an unintended or unanticipated behaviour that causes a vulnerability or fatal error store-elasticsearch labels May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Occurrence of an unintended or unanticipated behaviour that causes a vulnerability or fatal error store-elasticsearch
Projects
None yet
Development

No branches or pull requests

1 participant