I have created a plugin/webservice in moodle in my local folder in moodle, when i converted the folder to zip and then installed it; it would install correctly in local folder in moodle. Now i want to install it in the mod folder so i changed the path from local to mod everywhere in my plugin and now when i try installing i get the following error.
XML database file errors found
More information about this error
Debug info: File does not exist
Error code: ddlxmlfileerror
Stack trace:
line 346 of \lib\ddl\database_manager.php: ddl_exception thrown
line 370 of \lib\ddl\database_manager.php: call to database_manager->load_xmldb_file()
line 841 of \lib\upgradelib.php: call to database_manager->install_from_xmldb_file()
line 576 of \lib\upgradelib.php: call to upgrade_plugins_modules()
line 1929 of \lib\upgradelib.php: call to upgrade_plugins()
line 713 of \admin\index.php: call to upgrade_noncore()
I don't want to add anything to the database when installing my plugin, i even created an empty install.xml but i get a different error i.e.
Debug info: Errors found in XMLDB file: Missing TABLES section
Error code: ddlxmlfileerror
Can anyone provide me with a solution, Thank you in advance.
Activity plugins are not the same as local plugins.
With local plugins you can do pretty much anything you like.
But Activity plugins have a lot of requirements - including a main database table which is the same name as the plugin. So you will need to create an install.xml file.
There is documentation here on creating an activity plugin.
https://docs.moodle.org/dev/Activity_modules#install.xml
Related
I have an activity plugin that requires another plugin to work correctly.
I followed the recommendation of requesting this plugin as a dependency in the version.php file like this :
$plugin->dependencies = array('local_aws' => 2017071501 ); //AWS php SDK dependency
The problem is when I install my plugin I receive a Warning :
Warning:
require_once(/var/www/moodle/local/aws/sdk/aws-autoloader.php): failed
to open stream: No such file or directory in
/var/www/moodle/mod/tutorship/lib.php on line 37
Fatal error: require_once(): Failed opening required
'/var/www/moodle/local/aws/sdk/aws-autoloader.php'
(include_path='/var/www/moodle/lib/pear:.:/usr/share/php') in
/var/www/moodle/mod/mymodulep/lib.php on line 37
Line 37 uses this code:
// For AWS API Part
require_once($CFG->dirroot . '/local/aws/sdk/aws-autoloader.php');
So it seems to me during the install of my plugin the require_ once is not being satisfied as the AWS plugin has yet to be installed. Well I followed the recommendation of making it a dependency in version.php but it isn't being installed before the require_ once is checked ?
How can I resolve this conundrum ?
I think you are right in your supposition that "require_ once is not being satisfied as the AWS plugin has yet to be installed". To avoid this kind of problem, you should try to avoid to require files of other plugins/libraries in lines that are actually executed during the plugin installation/upgrading procedures. Is it necessary to use the other plugin during the installation of yours?
I would move the require_once($CFG->dirroot . '/local/aws/sdk/aws-autoloader.php'); to some file that is never run during the actual installation/upgrading (avoid the header of lib.php). For example, I would create a class mod/tutorship/classes/some_class.php (properly "namespaced" with namespace mod_tutorship;), do the require_once there and then just instantiate the class in my lib.php within the function that actually needs it.
I am trying to put this website back online. The error message is the following:
Fatal error: Uncaught Error: Call to undefined function get_header()
in
/homepages/25/d584099293/htdocs/clickandbuilds/X3DSYSTEMS/wp-content/themes/x3dprotheme/index.php:4
Stack trace: #0 {main} thrown in
/homepages/25/d584099293/htdocs/clickandbuilds/X3DSYSTEMS/wp-content/themes/x3dprotheme/index.php
on line 4
The client told me he "accidentally reset the domain".
First when I went on the website, I had an error message about Wordfence and I did what I needed to do to correct it (here what I did:
After moving a site or deleting some files, I see: PHP Fatal error: Unknown: Failed opening required /var/www/html/wordfence-waf.php
I removed the firewall setup manually.
Then I got this new error message about index.php:
In this index.php, here is what I found:
<?php get_header(); ?>
<?php get_footer(); ?>
I try to get this website back online.
The webhost is 1and1 IONOS. I can't log into WP, but I have SFTP access.
What webhost is this? Maybe if we know, we can ascertain what the "domain reset" involved and backtrack the fix once we know exactly what those steps entailed.
When these sorts of things happen to me (I manage about 30 WordPress sites), the first thing I do is disable all plugins, and sometimes if I can't actually log into WordPress, I remove the plugins via SFTP or through cPanel.
You're stuck though if you have no access to the host. It'll extremely difficult to solve this without access to the server or control panel for the hosting environment. Do you at least have SFTP access?
This looks like a path to a core theme file.
If you are using child theme, you should be able to update the parent via the theme settings found in your dashboard, without data loss from style sheets, etc. you made in your child theme.
This would work like the backup restore as suggested above, but without the need to get into cPanel or FTP.
The client changed the "target" with his webhost, and the site is back online.
There was also a problem with revolution slider, but anyway, the problem looks solved.
I have a friend who has a problem on his website under wordpress.
Wordpress did an update 10 hours ago and since, we cannot enter the website.
We aren't developpers and we don't know anything about it, and we don't know how to fix this easily. Can someone help us please ?
(Sorry for the bad english as I'm french)
When I try to get on the website, it show this :
Fatal error: require(): Failed opening required
'/home/u438775107/public_html/wp-includes/class-wp-list-util.php'
(include_path='.:/opt/php-5.5/pear') in
/home/u438775107/public_html/wp-settings.php on line 97
Try to following steps
1)Remove the Error plugin Directory
like:- c://wamp/www/wordpress/wp-content/plugins/revslider
2)Upload this backup plugin and active plugin
3)Then after solve this type of errors.
You are getting this error because the WordPress was not updated Successfully.
Try the following to fix it:
1!) Re-install WordPress Manually.
Take a backup of wp-content (from the file manager) and your database (from phpmyadmin or console if you don't have a GUI), just reinstall the core files.
2) Check homeurl and siteurl form phpmyadmin (should be in the wp_options table)
3) rename .htaccess file form root so that it is disabled untill we get the issues fixed.
5) Always user private browser to remove cache and check if the issue was solved.
It should work fine now.
I've updated my mediawiki from 1.26.2 to 1.27, the installation process finished ok, but when I try to access I received this error:
Warning:
require(/var/app/current/includes/specials/SpecialUserLogin.php):
failed to open stream: No such file or directory in
/var/app/current/includes/AutoLoader.php on line 81 Fatal error:
require(): Failed opening required
'/var/app/current/includes/specials/SpecialUserLogin.php'
(include_path='/var/app/current/vendor/pear/pear_exception:/var/app/current/vendor/pear/console_getopt:/var/app/current/vendor/pear/pear-core-minimal/src:/var/app/current/vendor/pear/mail_mime:/var/app/current/vendor/pear/mail_mime-decode:/var/app/current/vendor/pear/net_socket:/var/app/current/vendor/pear/net_smtp:/var/app/current/vendor/pear/mail:.:/usr/share/pear:/usr/share/php')
in /var/app/current/includes/AutoLoader.php on line 81
I have no idea why is this happening. If I check the files in my server they're there. I'm also having template issues if I choose vector I only get a messed up template, without styling.
I'm using PHP 5.6.
I hope someone can help me.
I just stumbled across this same exact error after upgrading to MW 1.27.
In my case, the SpecialUserlogin.php existed and all of the permissions were right BUT the word login was written in lowercase so the system thought this file didn't exist. So I just renamed the SpecialUserlogin.php to SpecialUserLogin.php and b00m, it worked!
As for your templating issues, check the common.css file. Copy paste everything out of there, so it's empty, if you don't use it. And check that you're calling your style files correctly in your template.
I just installed the Google mirror API. I have everything setup except after I log in to the API, I get this error message:
Notice: A session had already been started - ignoring session_start() in C:\xampp\htdocs\mirror-client.php on line 33
Fatal error: Uncaught exception 'Exception' with message 'Unable to open database: unable to open database file' in C:\xampp\htdocs\util.php:62 Stack trace: #0 C:\xampp\htdocs\util.php(62): SQLite3->__construct('/tmp/database.s...') #1 C:\xampp\htdocs\util.php(26): init_db() #2 C:\xampp\htdocs\oauth2callback.php(41): store_credentials('107736579479351...', '{"access_token"...') #3 {main} thrown in C:\xampp\htdocs\util.php on line 62
It seems that the API can't create the database or do I need to create it?
I tried making a folder and database as it is set up in the config.php file "tmp/database.sqlite" but no luck.
Any ideas?
I figured out that you had to make your own database for it to work.
It can mean that the directory/folder you placed the sqlite file in (and the file itself) does not have the correct permissions. You need to make sure both the folder and the file have read and write permissions. The xampp directory in my environment has read/write permissions. You might want to place your database there, at least for testing purposes.
Note: The /tmp directory as mentioned in "/tmp/database.sqlite" is a Linux/Mac directory. You may want to change the value of $sqlite_database in the config.php file to point to a file in a Windows directory.