Error while updating Drupal with drush - drupal

I want to update my drupal, but when I am executing drush up there is an error:
The tb_sirate_starter directory could not be found within the profiles directory at /var/www/html/project/sites/all/modules/tb_megamenu, perhaps the project is enabled but has been deleted from disk.
I have tb_megamenu and I tried to install tb_sirate_starter but the error is not disappearing

The update might have moved files around and failed before the system table in Drupal's database was updated.
Try installing the Regsitry Rebuild project (if not installed already) and running a registry rebuild: https://www.drupal.org/project/registry_rebuild.
You can see if you already have it installed and run it by executing:
drush rr
If you do not have it installed already, go ahead an install it and follow directions on the project page to run it.
Once that is complete, run an updb and cache clearas well:
drush updb -y
drush cc all
Be sure to make a backup of your database and codebase before doing any of this (as you should have before running drush up in your original attempt and as you should before any and all upgrades).

Related

Drupal site is broken due to badly installed module

I tried to install Simple OAuth (https://www.drupal.org/project/simple_oauth) module in my drupal site running in a shared Godaddy hosting. My first mistake was not to read the installation guide instructing to install the module by using composer. Instead, I installed the module using the Extend=>install a module link within Drupal. Installing the simple_oauth and enabling the module crashed my site and there is no output from the site.
Then I realised there is something wrong with the installation and checked the error log file. The error logged was:
PHP Fatal error: Interface 'League\OAuth2\Server\Repositories\AccessTokenRepositoryInterface' not found in /home/-----------/public_html/drupal/modules/simple_oauth/src/Repositories/AccessTokenRepository.php on line 10
At that point I realised there is something wrong with the installation and checked the module instructions which states I should use composer to install the module. I tried to solve this problem by redoing the installation from the ssh by using composer and this command:
composer config repositories.drupal composer https://packages.drupal.org/8 && composer require drupal/simple_oauth:^3
Which did not work because GoDaddy shared hosting plan has only 512mb of rams and composer kills the command because of lack of memory.
I tried reading through and understand how Composer works. There were recommendations saying you should never use composer in a production site and you should run it on your computer and copy the composer.lock file which needs much less rams. I created a PHP server using XAMMP on my computer and copied the composer.json file to my computer and run composer update command in my computer. It downloaded the dependencies and stuff on my computer. And feeling I get the hang of it, I copied the composer.lock file in my drupal server, run composer update command and saw composer delete many stuff which I could not undo.
So my questions are: 1- Is there a way of rescuing this drupal site at this point? I deleted many composer dependencies as far as I can understand.
The new error log says: PHP Fatal error: Interface 'Symfony\Component\HttpKernel\HttpKernelInterface' not found in /home/--------/public_html/drupal/core/lib/Drupal/Core/DrupalKernelInterface.php on line 15
2- If not, which is fine as I was just beginning to setup the site. Is it possible for someone to explain the best way of handling this scenario? I mean installing a module using composer in a memory critical place. Or explain how composer works for layman. I read about all the dependency stuff but could not figure out how to use it for this scenario.
Thanks.

Drupal - drush installation on mamp server

I have a drupal project, and I am trying to install drush for mamp server. I have run:
composer global require drush/drush:dev-master
In the directory of my project, but when I am trying to run:
drush status
I get:
command not found: drush
Follow information listed in : https://www.drupal.org/node/1674222
At the very least, you definitely did not carry these two steps out correctly, which symlink the "drush" binary.
cd /usr/bin
ln -s /Users/myusername/drush/drush
Replace /Users/myusername/ with the name of the directory where you unpacked Drush.
You may need to quit and restart Terminal after completing these instructions before running any drush commands.
http://youtu.be/TCg02d4am_Q for more details
If you're still having problems, I suggest following the instructions here: https://www.drupal.org/node/1674222 and reporting back, editting your answer to reflect the new error you get, so we can actually help you figure out what step of the install you're not running successfully.

Drupal 8 Composer Your requirements could not be resolved to an installable set of packages - commerceguys/intl

I want to install it.
drupal.org/project/social
But also ssh I get an error.
I installed Composer and Drush.
composer-creator of the project goalgorill / social_templat to: giant-master Dr --no-interaction
I get an error in the command enters the picture.
Composer is telling you exactly what is wrong:
the requested PHP extension bcmath is missing from your system
and how to fix it:
To enable extensions, verify that they are enabled in those ini files
Install and enable the bcmath extension. The exact process will depend on your operating system and how you installed PHP.

How to rename a Symfony 2 installation folder correctly?

I install Symfony 2.3.0-DEV this way:
composer self-update
git clone https://github.com/symfony/symfony-standard test1
copy .\test1\app\config\parameters.yml .\test1\app\config\parameters.yml.dist
composer install
But, Every time I've had to rename (ie. to "test2") the project folder. My installation breaks and shows errors:
Warning: require_once(C:\xampp\htdocs\symfony-projects\test1\web/../app/bootstrap.php.cache): failed to open stream: No such file or directory in C:\xampp\htdocs\symfony-projects\test1\web\app_dev.php on line 19
Fatal error: require_once(): Failed opening required 'C:\xampp\htdocs\symfony-projects\test1\web/../app/bootstrap.php.cache' (include_path='.;\xampp\php\PEAR') in C:\xampp\htdocs\symfony-projects\test1\web\app_dev.php on line 19
I tried, deleting cache folders, deleting the bootstrap.cache.php file, and re-installing/updating vendors, including the autoloader, also with cache:warmup and cache:clear, changing permissions. And still nothing...
Finally solved it ! That's what I've done.
composer self-update
git clone https://github.com/symfony/symfony-standard test1
copy .\test1\app\config\parameters.yml .\test1\app\config\parameters.yml.dist
composer install
Loaded http://localhost/symfony-projects/test1/web/app_dev.php once.
Closed the browser (chrome), stopped xampp (apache/mysql), and the powershell
Deleted /app/cache/* and /app/bootstrap.php.cache file
Closed the IDE, Logoff my user session in Windows 8 (starting feeling paranoid)
Renamed the folder test1 to test2
Executed composer update command to call post-update-cmd scripts to be sure that bootstrap.php.cache is rebuild
Went to http://localhost/symfony-projects/test2/web/app_dev.php
And then works. Probably that issue was due to locked files...
#Touki Thanks, the APC thing was a good insight but not needed it ;)
this topic is quite old but I just had the same problem. The problem was: I installed symfony2 using command:
php composer.phar create-project symfony/framework-standard-edition myProject 2.1.x-dev
but I had the same fatal error. However, my solution was to go myProject directory and run command:
composer update
And that is all, project was rebuilded and file "bootstrap.php.cache" appeard :)
I hope this helps.
Next time, just restart your machine.

Composer "chmod(): No such file or directory" with bin directory

I am trying to install my Symfony2 app on koding.com
Trying to install my vendors via php composer.phar update, I run into the following issue, installing doctrine/orm:
Installing doctrine/orm (2.3.x-dev 4d9f24b)
Cloning 4d9f24b2eef3af3a3e76c773994c19bbb0706f88
[ErrorException]
chmod(): No such file or directory
I tried to debug with -v and found out that the following line is causing this issue:
composer.phar/src/Composer/Installer/LibraryInstaller.php:217
In there I see that this issue is related to the bin directory. I have set (S2 default) the bin-dir to "bin". The bin directory is also in place within my project, but somehow composer does not find it, when trying to change the chmod. I have used this setup on several windows machines and also on c9.io.
Issue resolved due to fix on github: https://github.com/composer/composer/issues/1270

Resources