I am currently attempting to install the Wikibase extension to my new Mediawiki installation. Here is the php stack trace:
running media wiki
Notice: Undefined index: entityNamespaces in /var/www/mediawiki/extensions/Wikibase/lib/includes/WikibaseSettings.php on line 212
Warning: array_merge(): Expected parameter 2 to be an array, null given in /var/www/mediawiki/extensions/Wikibase/lib/includes/WikibaseSettings.php on line 212
Notice: Undefined index: entityNamespaces in /var/www/mediawiki/extensions/Wikibase/lib/includes/WikibaseSettings.php on line 212
Warning: array_merge(): Expected parameter 2 to be an array, null given in /var/www/mediawiki/extensions/Wikibase/lib/includes/WikibaseSettings.php on line 212
Notice: Undefined index: entityNamespaces in /var/www/mediawiki/extensions/Wikibase/lib/includes/WikibaseSettings.php on line 212
Warning: array_merge(): Expected parameter 2 to be an array, null given in /var/www/mediawiki/extensions/Wikibase/lib/includes/WikibaseSettings.php on line 212
Fatal error: Uncaught TypeError: Argument 2 passed to Wikibase\Lib\WikibaseSettings::applyEntityNamespacesToSettings() must be of the type array, null given, called in /var/www/mediawiki/extensions/Wikibase/lib/includes/WikibaseSettings.php on line 103 and defined in /var/www/mediawiki/extensions/Wikibase/lib/includes/WikibaseSettings.php:218 Stack trace: #0 /var/www/mediawiki/extensions/Wikibase/lib/includes/WikibaseSettings.php(103): Wikibase\Lib\WikibaseSettings::applyEntityNamespacesToSettings(Object(Wikibase\Lib\SettingsArray), NULL) #1 /var/www/mediawiki/extensions/Wikibase/client/includes/WikibaseClient.php(689): Wikibase\Lib\WikibaseSettings::getClientSettings() #2 /var/www/mediawiki/extensions/Wikibase/client/includes/WikibaseClient.php(737): Wikibase\Client\WikibaseClient::newInstance() #3 /var/www/mediawiki/extensions/Wikibase/client/includes/Hooks/MagicWordHookHandler.php(39): Wikibase\Client\WikibaseClient::getDefaultInstance() #4 /var/www/mediawiki/vendor/wikimedia/object-factory/src/ObjectFactory.php(172): in /var/www/mediawiki/extensions/Wikibase/lib/includes/WikibaseSettings.php on line 218
I tried to follow the Wikibase Installation guide to the letter to only install Wikibase Client, but I don't think I did. Sepcificially I think my LocalSettings.php is the issue. I installed the extension as instructed by the guide, so I'm confident that I'm using whatever the most recent version of Wikibase is (though I can't seem to find a version number anywere) and I am using MediaWiki 1.35 with PHP 7.3.23-4 on Ubuntu 18.04 hosted with nginx.
This is the bit I added to the end of my LocalSettings.php that breaks my installation, but without I can't use infoboxes, which is my real goal here.
# Wikibase
wfLoadExtension( 'WikibaseClient', "$IP/extensions/Wikibase/extension-client.json" );
require_once "$IP/extensions/Wikibase/client/ExampleSettings.php";
$wgWBClientSettings['repoUrl'] = 'https://pool.my.wiki';
$wgWBClientSettings['repoScriptPath'] = '';
$wgWBClientSettings['repoArticlePath'] = '/wiki/$1';
$wgWBClientSettings['repositories']['']['repoDatabase'] = 'poolwiki';
$wgWBClientSettings['repositories']['']['changesDatabase'] = 'poolwiki';
$wgWBClientSettings['siteLinkGroups'] = [ 'mywikigroup' ];
wgWBClientSettings['siteGlobalID'] = 'en';
I'm sure I just bungled an obvious step somewhere, but I've been over it so many times and I have no idea where.
I try to document all new installations very thoroughly for situations just like this, you can find my current setup along with the steps I took during installation on my github repository: https://github.com/PickleProgramming/AlQinaWiki
You can find my full LocalSettings.php there, along with any other files I might have bungled.
First of all, you need to switch your WikiBase to the version 1.35. Currently, you have 1.36 (master):
cd .../extensions/WikiBase
git checkout REL1_35
git pull
git submodule update --init --recursive
You also may need to install dependencies with Composer as described here.
Secondly, make sure that your wiki doesn't think that it is also a WikiBase repository. Insert $wgEnableWikibaseRepo = false before wfLoadExtension( 'WikibaseClient', "$IP/extensions/Wikibase/extension-client.json" );
Thirdly, which wiki is going to serve as a WikiBase repository for you?
Related
I have a newly cloned phalcon repository:
software: MacOS
Phalcon: 5.0.0RC4
PHP: 8.1
Zephir: 0.16.0
brew: phalcon#4.1.0
Location: ~/Documents/cphalcon
I am trying to set up my new repository by following the tutorial here.
However when I go to my page at localhost:8000, this error pops up:
Fatal error: Uncaught Error: Class "Phalcon\Loader\Loader" not found in /Users/apple/Documents/cphalcon/public/index.php:16 Stack trace: #0 /Users/apple/Documents/cphalcon/.htrouter.php(15): require_once() #1 {main} thrown in /Users/apple/Documents/cphalcon/public/index.php on line 16
I found some similar thread and they said to check my phpinfo to see if phalcon is there, and it was.
I checked for more materials but couldn't find any other clues.
I also tried changing the call to:
use Phalcon\Loader;
But it was the same
Fatal error: Uncaught Error: Class "Phalcon\Loader" not found in /Users/apple/Documents/cphalcon/public/index.php:16 Stack trace: #0 /Users/apple/Documents/cphalcon/.htrouter.php(15): require_once() #1 {main} thrown in /Users/apple/Documents/cphalcon/public/index.php on line 16
Any clues?
I believe that in version 5 the proper syntax now is Phalcon\Autoload\Loader().
Since Phalcon 5 is still in Release Candidate mode (hence the "RC4" on the version), the docs are still lagging a bit behind.
I've converted a couple of Phalcon 3 and 4 sites, and I found the Phalcon 5.0.0RC4 ChangeLog to be helpful when moving from Phalcon 4 to 5. The move from 3 to 5 is far more involved and requires finding the Phalcon 4 update doc on the Phalcon web site.
I hope this helps.
I installed library from endroid's github (qr-code).
When i was trying to do php spark serve, it said:
Fatal error: Uncaught TypeError: Argument 1 passed to CodeIgniter\CLI\Console::_
_construct() must be an instance of CodeIgniter\CodeIgniter, int given, called i
n D:\Kuliah\Magang\akses-log-data-center-itb\spark on line 49 and defined in D:\
Kuliah\Magang\akses-log-data-center-itb\vendor\codeigniter4\framework\system\CLI
\Console.php:29
Stack trace:
#0 D:\Kuliah\Magang\akses-log-data-center-itb\spark(49): CodeIgniter\CLI\Console
->__construct(1)
#1 {main}
thrown in D:\Kuliah\Magang\akses-log-data-center-itb\vendor\codeigniter4\frame
work\system\CLI\Console.php on line 29
How do i fix this?
try this
copy the index.php file in vendor/codeigniter4/framework/public/index.php (to) public/index.php
then
copy spark file in vendor/codeigniter4/framework/spark (to) root folder
from:
https://forum.codeigniter.com/printthread.php?tid=82087
Just to add to Brian's answer, I found out that the spark file was updated in version 4.2.0. If you have experienced this issue, I suggest you read its changelog to learn about other breaking changes.
Fatal error: Uncaught Error: Class 'Composer\CaBundle\CaBundle' not found in
C:\xampp\htdocs\CompleteWDC\cha10_APIs\twitter-api\twitteroauth\src\TwitterOAuth.php:572 Stack trace:
#0 C:\xampp\htdocs\CompleteWDC\cha10_APIs\twitter-api\twitteroauth\src\TwitterOAuth.php(620): Abraham\TwitterOAuth\TwitterOAuth->curlOptions()
#1 C:\xampp\htdocs\CompleteWDC\cha10_APIs\twitter-api\twitteroauth\src\TwitterOAuth.php(557): Abraham\TwitterOAuth\TwitterOAuth->request('https://api.twi...', 'GET', 'Authorization: ...', Array, false)
#2 C:\xampp\htdocs\CompleteWDC\cha10_APIs\twitter-api\twitteroauth\src\TwitterOAuth.php(490): Abraham\TwitterOAuth\TwitterOAuth->oAuthRequest('https://api.twi...', 'GET', Array, false)
#3 C:\xampp\htdocs\CompleteWDC\cha10_APIs\twitter-api\twitteroauth\src\TwitterOAuth.php(467): Abraham\TwitterOAuth\TwitterOAuth->makeRequests('https://api.twi...', 'GET', Array, false)
#4 C:\xampp\htdocs\CompleteWDC\cha10_APIs\twitter-api\twitteroauth\src\TwitterOAuth.php(232): Abraham\TwitterOAuth\TwitterOAuth->http('GET', 'h in C:\xampp\htdocs\CompleteWDC\cha10_APIs\twitter-api\twitteroauth\src\TwitterOAuth.php on line 572
I'm using it for the first time, so checked the TwitterOAuth.php file and line 572 then vscode says the CaBundle is undefined Type Undefined type 'Composer\CaBundle\CaBundle'. , I tried downloading the file over and over again but the same error.
I had the exact same problem following the instructions on here.
It turns out I wasn't including the right autoload. For those coming across the same problem:
Install composer locally on your directory as per these instructions.
Run php composer require abraham/twitteroauth.
Run php composer install.
Make sure to include the right path to the composer autoloader file, not the package autoloader, in your PHP code require "vendor/autoload.php";.
In each file that you will be using the package, don't forget to include the line use Abraham\TwitterOAuth\TwitterOAuth as TwitterOAuth;, so that you can use $foo = new TwitterOAuth();
I hope this helps those who might be new to composer like me.
I have installed magento2 in my linux centos7. After installing magento2 successfully while accessing the web page is getting following error with empty content.
{{menuState.title}}
PHP version:7.1.3
OS: centos7
And the PHP-fpm error log has following error.
PHP Fatal error: Uncaught TypeError: Argument 1 passed to Zend_Controller_Plugin_Abstract::setResponse() must be an instance of Zend_Controller_Response_Abstract, instance of Magento\Framework\HTTP\PhpEnvironment\Response given, called in /var/www/magento2/lib/internal/Magento/Framework/Profiler/Driver/Standard/Output/Firebug.php on line 61 and defined in /var/www/magento2/vendor/magento/zendframework1/library/Zend/Controller/Plugin/Abstract.php:70
Stack trace:
#0 /var/www/magento2/lib/internal/Magento/Framework/Profiler/Driver/Standard/Output/Firebug.php(61): Zend_Controller_Plugin_Abstract->setResponse(Object(Magento\Framework\HTTP\PhpEnvironment\Response))
#1 /var/www/magento2/lib/internal/Magento/Framework/Profiler/Driver/Standard.php(195): Magento\Framework\Profiler\Driver\Standard\Output\Firebug->display(Object(Magento\Framework\Profiler\Driver\Standard\Stat))
#2 [internal function]: Magento\Framework\Profiler\Driver\Standard->display()
#3 {main}
thrown in /var/www/magento2/vendor/magento/zendframework1/library/Zend/Controller/Plugin/Abstract.php on line 70
How can I resolve this error?
This was a Magento Bug reported ...
But it's already been ...
https://github.com/magento/magento2/issues/7068
So, come on ...
Did you update the magento? What is the current version?
I found this information at the base of Magento: https://devdocs.magento.com/guides/v2.3/config-guide/bootstrap/mage-profiler.html
You have this option ...
The temporary fix is install symfony / yaml from dev branch and then our module:
composer require symfony/yaml: dev-issue-814
composer require mirasvit/module-profiler
Try using / installing php7.2
See this Magento Project reference >>>
https://magento.stackexchange.com/questions/49000/magento-2-is-there-a-profiler
Be sure to back up before the above procedures ...
Since I don't know the correct version of your current Magento, I looked for alternatives to fix.
I hope it helps you ...
Good luck! Send news about your progress ...
I got a error when I try create a project using the zend framework command line:
[user ~] /home/user/public_html $ zf create project openstart
PHP Catchable fatal error: Argument 1 passed to Zend_Tool_Framework_Client_Console_ArgumentParser::setArguments() must be an array, null given, called in /home/user/downloads/ZendFramework-1.10.5/library/Zend/Tool/Framework/Client/Console.php on line 194 and defined in /home/user/downloads/ZendFramework-1.10.5/library/Zend/Tool/Framework/Client/Console/ArgumentParser.php on line 79
Catchable fatal error: Argument 1 passed to Zend_Tool_Framework_Client_Console_ArgumentParser::setArguments() must be an array, null given, called in /home/user/downloads/ZendFramework-1.10.5/library/Zend/Tool/Framework/Client/Console.php on line 194 and defined in /home/user/downloads/ZendFramework-1.10.5/library/Zend/Tool/Framework/Client/Console/ArgumentParser.php on line 79
zf is a symlink to /home/user/downloads/ZendFramework-1.10.5/bin/zf.sh
Any ideas?
Try a newer version of Zend Framework if possible, they are at 1.11.10 now and I think a number of zend tool issues have been resolved since then.
If I run your command on the newest version I get no errors and the project is created.