I am trying to set up a new MediaWiki 1.35 install and add the Wikibase extension. The install is running on a Debian 10 LXC container hosted on proxmox.
I have been following the Wikibase/Installation MediaWiki guide but I seem to be stuck. When I get to the 'Run Maintenance Scripts' step and try to run php update.php it thows the following error:
[10e7e1e19b828fdfd6418545] [no req] Error from line 47 of /var/lib/mediawiki/extensions/Wikibase/lib/WikibaseLib.entitytypes.php: Class 'Wikibase\DataModel\Entity\ItemId' not found
Backtrace:
#0 /var/lib/mediawiki/extensions/Wikibase/client/includes/WikibaseClient.php(532): require()
#1 /var/lib/mediawiki/extensions/Wikibase/client/includes/WikibaseClient.php(748): Wikibase\Client\WikibaseClient::getDefaultEntityTypes()
#2 /var/lib/mediawiki/extensions/Wikibase/client/includes/WikibaseClient.php(796): Wikibase\Client\WikibaseClient::newInstance()
#3 /var/lib/mediawiki/extensions/Wikibase/client/includes/Usage/Sql/SqlUsageTrackerSchemaUpdater.php(64): Wikibase\Client\WikibaseClient::getDefaultInstance()
#4 /var/lib/mediawiki/includes/installer/DatabaseUpdater.php(554): Wikibase\Client\Usage\Sql\SqlUsageTrackerSchemaUpdater::fillUsageTable(MysqlUpdater)
#5 /var/lib/mediawiki/includes/installer/DatabaseUpdater.php(522): DatabaseUpdater->runUpdates(array, boolean)
#6 /var/lib/mediawiki/maintenance/update.php(181): DatabaseUpdater->doUpdates(array)
#7 /var/lib/mediawiki/maintenance/doMaintenance.php(107): UpdateMediaWiki->execute()
#8 /var/lib/mediawiki/maintenance/update.php(253): require_once(string)
#9 {main}
I made sure to clone the proper version of Wikibase (REL1_35). I've looked everywhere for a solution but it seems like I have messed up in a unique way. I should also mention that is my first time setting up a MediaWiki server so any help is greatly appreciated.
I made a git and uploaded everything in the root of the MediaWiki install: https://github.com/ggosset2017/MediaWiki-Install.git
Update:
Looks like it's a problem with some dependency. I did make sure to install composer and install dependencies following the WIkibase guide linked above. I used the following commands/file edits.
First, I updated the composer.local.json file in the root of MediaWiki install to match the following:
{
"extra": {
"merge-plugin": {
"include": [
"extensions/Wikibase/composer.json"
]
}
},
"require": {
"monolog/monolog": "~2.0.2"
}
}
sshed into the container and ran the following.
rm composer.lock
composer install --no-dev
Everything seemed to download fine and the only error I got was the following:
Warning from https://repo.package.org: you are using an outdated version of Composer. Composer 2 is now available and you should upgrade. See https://getcomposer.org/2
I expected this error as MediaWiki does not support composer 2, at least according to this: https://www.mediawiki.org/wiki/Composer#Installing_Composer
Update 2:
Looks like my composer.local.jason file was somehow changed to composer.local.jason-sample. I have removed the -sample appended to that file name. Now composer is throwing the following error when I try to run rm composer.lock and composer install --no-dev
image of composer error
In Solver.php line 243:
Problem 1
- The requested package monolog/monolog ~2.0.2 exists as monolog/monolog[1.25.5] but these are rejected by your constraint.
Related
I'm trying to do docker-compose up -d --build and thereĀ“s a part where I get the errors
RUN composer install --prefer-dist --no-dev --optimize-autoloader --no-interaction:
#0 0.785 Installing dependencies from lock file
#0 0.787 Verifying lock file contents can be installed on current platform.
#0 0.802 Your lock file does not contain a compatible set of packages. Please run composer update.
#0 0.802
#0 0.802 Problem 1
#0 0.802 - doctrine/lexer is locked to version 3.0.0 and an update of this package was not requested.
#0 0.802 - doctrine/lexer 3.0.0 requires php ^8.1 -> your php version (8.0.6) does not satisfy that requirement.
but when I do php --version I have version 8.2.0 and when I run Apache I get the same result, version 8.2.0.
I've tried basically everything I've found online but nothing seems to fix the issue.
Am I doing something wrong?
Thanks alot for your time :)
The problem is not in the docker itself, during the initialization of the instance it tries to run a composer install and finds a discrepancy between the content of the composer.lock and its instance.
In its place, initially I would try to delete this composer.lock file, if that doesn't solve it, the ideal would be to check the Dockerfile and check the PHP version and the scripts it runs, maybe even add a flag --ignore-platform- reqs on composer install
I'm having an issue upgrading my Drupal website from Drupal version 8.7 site to 9.3
Tried to run the automatic update script from Drupal on the staging environment, but even though the script displayed a success message, somehow the website return an unexpected error and is totally inaccessible.
I have a freshly installed Mac Book Pro with only a local web server (MAMP) installed and a locally cloned git of website code without a composer build, so any help with detail on a step-by-step workaround is greatly appreciated.
Thanks in advance for your support.
I already check the application.log and it produces this error below.
But I can't find any of these files on my site build, can someone help me out with what do I need to do to fix this issue?
==> app.log <== Error: Class 'Drush\Log\DrushLog' not found in /app/core/lib/Drupal/Component/DependencyInjection/Container.php on line 262 #0 /app/core/lib/Drupal/Component/DependencyInjection/Container.php(176): Drupal\Component\DependencyInjection\Container->createService(Array, 'logger.drupalto...') #1 /app/core/lib/Drupal/Component/DependencyInjection/Container.php(437): Drupal\Component\DependencyInjection\Container->get('logger.drupalto...', 1) #2 /app/core/lib/Drupal/Component/DependencyInjection/Container.php(276): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array) #3 /app/core/lib/Drupal/Component/DependencyInjection/Container.php(176): Drupal\Component\DependencyInjection\Container->createService(Array, 'logger.factory') #4 /app/core/lib/Drupal/Component/DependencyInjection/Container.php(437): Drupal\Component\DependencyInjection\Container->get('logger.factory', 1) #5 /app/core/lib/Drupal/Component/DependencyInjection/Container.php(240): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array) #6 /app/core/lib/Drupal/Component/DependencyInjection/Container.php(176): Drupal\Component\DependencyInjection\Container->createService(Array, 'autologout.mana...') #7 /app/core/lib/Drupal/Component/DependencyInjection/Container.php(437): Drupal\Component\DependencyInjection\Container->get('autologout.mana...', 1) #8 /app/core/lib/Drupal/Component/DependencyInjection/Container.php(240): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array) #9 /app/core/lib/Drupal/Component/DependencyInjection/Container.php(176): Drupal\Component\DependencyInjection\Container->createService(Array, 'autologout_even...') #10 /app/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(136): Drupal\Component\DependencyInjection\Container->get('autologout_even...')
I would suggest first, checking the Drupal status report and making sure that there are no alerts and warnings still present on the information.
If there are no critical issues reported on the status, backup existing source code and database for safekeeping.
These particular error messages are related to missing Drupal components and dependencies, so the best approach is to run the composer.
If you're on a new device, download the composer first.
Open the Mac Terminal and run this command to download and set up the composer on your devices.
sudo php -r "copy('https://getcomposer.org/installer','composer-setup.php');"
sudo php composer-setup.php
sudo php -r "unlink('composer-setup.php');"
To install globally and make composer executable on any folder, run
sudo mv composer.phar /usr/local/bin/composer
change the directory to the local website code and run
composer install
wait until it finished installing the required dependencies and run
composer update
just to make sure, the dependencies are updated as well.
your error mentioned missing drush so run composer with drush, and add all the installed files that was just been added to the local git source code
composer require drush/drush
git add composer.lock -f
then just add all the new files, commit and push all the changes to the staging website
git add .
git commit -m "message about dependencies"
git push
If your cloud provider has CI/CD integrated into the repository, the code push should have deployed everything directly on the site.
Due to unable to access Terminal in hosting server, I ran composer update in my local machine and uploaded everything including vendor folder, composer.json and composer.lock. My hosting server run PHP 7.1 and so does my local machine with Laravel 5.5.
Now I am facing PHP Fatal error: Uncaught ReflectionException: Class view does not exist in /public_html/vendor/laravel/framework/src/Illuminate/Container/Container.php:752
Stack trace:
#0 /public_html/vendor/laravel/framework/src/Illuminate/Container/Container.php(752): ReflectionClass->__construct('view')
#1 /public_html/vendor/laravel/framework/src/Illuminate/Container/Container.php(631): Illuminate\Container\Container->build('view')
#2 /public_html/vendor/laravel/framework/src/Illuminate/Container/Container.php(586): Illuminate\Container\Container->resolve('view', Array)
#3 /public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(732): Illuminate\Container\Container->make('view', Array)
#4 /public_html/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(110): Illuminate\Foundation\Application->make('view', Array)
#5 /public_html/vendor/laravel/framework/src/Illuminate/Found in /public_html/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 752
I ran the following command.
composer require maatwebsite/excel --no-update
composer update maatwebsite/excel
And I uploaded the following files and folder from local to live server.
Vendor / maatwebsite folder and all other newly created by folders.
vendor / composer folder
composer.json
composer.lock
I cleared config cache, route cache, view cache from PHP file using artisan command.
Can anyone please help me to debug the error?
Thank you.
You're missing bootstrap/cache/packages.php and bootstrap/cache/services.php
These files are updated when you run composer require or update as part of the package discovery.
After attempting to remove and reinstall a package I'm getting this new error when I try to include('vendor/autoload.php');
Fatal error: Uncaught Error: Class >'ComposerAutoloaderInit7b3c839efeba468a3d595a365ceb8e89' not found in >mypath\vendor\autoload.php:7 Stack trace: #0 mypath\mypage.php(2): include() >#1 {main} thrown in mypath\vendor\autoload.php on line 7
I've tried running composer clearcache before and after reinstalling the package. I deleted C:/Users/MyUsername/AppData/Roaming/Composer and even completely uninstalled Composer. After I reinstalled composer and then reinstalled the package, the error message remains.
What am I missing? I feel like it has a hidden cache somewhere that's breaking this.
Your autoloader seems to be on an unfit state.
Just regenerate it.
composer dump-autoload
If this doesn't work (although it should), simply remove the whole vendor directory, and run composer install again.
Clearing composer's cache has no effect on this, since this is only the one used by composer to avoid downloading files all over again, not a project level cache.
I am trying to int Zend framework 2. I aready have xampp running. I followed the steps on this answer. How ever when I visit the url I specified I get the following descriptive error:
Fatal error: Uncaught exception 'RuntimeException' with message 'Unable to load ZF2. Run php composer.phar install or define a ZF2_PATH environment variable.' in C:\xampp\htdocs\ZendSkeletonApplication\init_autoloader.php:51 Stack trace: #0 C:\xampp\htdocs\ZendSkeletonApplication\public\index.php(18): require() #1 {main} thrown in C:\xampp\htdocs\ZendSkeletonApplication\init_autoloader.php on line 51
as the exception states. I went on to run the command php composer.phar install
and nothing happens. nothing displays on th cli to showing anything being installed. and when i run again application i get the same error. Where else can I look and check for errors. Thanks
I am using PHP Version 5.6.8
So what worked for me. I began again from scratch following the tutorial here
Then I still got a "could not open input file: composer.phar" when I ran the command: php composer.phar install
so according to "www.softanalyst.com/zend-2-framework-installation-with-xampp/#comment-883" I need to run the following command:
php -r "readfile('https://getcomposer.org/installer');" | php
which I did and it all worked.
open up your terminal and move To your project using the cd project directory
one type dir composer.phpr and try this one dir composer.json if both file listed than do the next step otherwise download the composer in current directory and run the following command as bellow.
php composer.phar install this comman will install all required dependency from the composer.json file. it will take time as depend on internet speed.
once it's complete than try this link for further steps.this link also having how To install composer And skeleton application.
Github
Twitter