Hi,
I had a warning in my site that there was a new core version of drupal.
My site is in /public_html/drupal-8.2.3. I downloaded the tar of the new version to /public_html.
In /public_html/drupal-8.2.3 (my site folder) I deleted all files and folders except "sites", "themes" and "modules". I unfortunatly deleted the "profiles" folder.
Then I copied alll the files and folders of the new version to /public_html/drupal-8.2.3 to update it.
Now when i try and run the update.php or access any page of the site i get this "The website encountered an unexpected error. Please try again later." error message.
Is it because I deleted the "profiles" folder? If yes, is there a way arround it?
Thanks in advance!
Comment | File | Size | Author |
---|---|---|---|
#39 | watchdog.txt | 34.9 KB | Serrano |
#37 | FieldStorageConfigStorage.php_.txt | 6.07 KB | alexpott |
#36 | watchdog1.txt | 42.43 KB | Serrano |
Comments
Comment #2
alexpott@Serrano what was in your profiles folder - is there anyway you can put back what was there. If it was empty it should not matter... you could just create an empty directory.
Also hopefully you have dblog enabled and maybe you can use drush to get the latest errors. Any information you can get from the logs would be useful.
Comment #3
Serrano CreditAttribution: Serrano commented@alexpott I never touched it.
I don't have it installed.
Is there any other way to check the logs?
Comment #4
alexpottSo try just creating an empty profiles directory - i don;'t think that is why this is occurring but you never know.
Hopefully dblog is installed... if you can access your database then running this query and pasting the output here would help:
select * from watchdog order by wid desc limit 20;
Comment #5
alexpottAlso if you can tell me what your
$settings['install_profile']
is set to in settings.php that'd be great too.Comment #6
Serrano CreditAttribution: Serrano commentedThis is the output of select * from watchdog by wid desc limit 20;
Comment #7
Serrano CreditAttribution: Serrano commented$settings['install_profile'] = 'standard';
Comment #8
alexpottSo it seems that a module that provides a field type has become uninstalled somehow. We need a better error here. We have an issue for this #2786443: \Drupal\field\FieldStorageConfigStorage::mapFromStorageRecords() can fail without a reasonable error - can you try applying the latest patch and then generating the error again and pasting the output of the same watchdog query.
Comment #9
Serrano CreditAttribution: Serrano commentedIs this how my file should look like?
Comment #10
alexpottThe lines starting throw new... do not look correct at the end.
Comment #11
alexpottThe line full line is:
Or just apply patches - see how here https://www.drupal.org/patch/apply
Comment #12
Anonymous (not verified) CreditAttribution: Anonymous commented#9: After 2786443-2-25.patch it should looks like this:
I also updated without
profiles
folder my local site (8.2.1 to 8.2.4) - all successful.Comment #13
Serrano CreditAttribution: Serrano commentedAfter updating my file, as said above, the output of the watchdog query is:
Comment #14
alexpott@Serrano that's a syntax error :( unfortunately it does not look like you patched the file correctly. The best way to patch is a file is to follow the instructions on https://www.drupal.org/patch/apply. You need to put the file back as it was and start again.
Maybe if you have drush installed you can use it to list the installed modules and see if any are missing as that is what is causing this. But you'll need to fix your codebase before doing that.
Comment #15
Serrano CreditAttribution: Serrano commentedThe command
git apply -v /home/afonso/drupal-8.2.3/2786443-2-25.patch
is not working..What am i doing wrong?
Comment #16
alexpott@Serrano nope - if you have a git checkout then go to the root (/home/afonso/public_html/drupal-8.2.3/) and do
git apply -v 2786443-2-25.patch
If you don't have git or a git checkout then...
patch -p1 < 2786443-2-25.patch
again run the command whilst in /home/afonso/public_html/drupal-8.2.3/
Comment #17
Serrano CreditAttribution: Serrano commentedIt gives me this error: fatal: can't open patch '2786443-2-25.patch' : No such file or directory
Even though https://www.drupal.org/files/issues/2786443-2-25.patch
Comment #18
Anonymous (not verified) CreditAttribution: Anonymous commented#9 code had errors:
#12 code was created by a command and hasn't this errors. Give me a link on you file after update. And please, spend your time studying patches, otherwise your actions like troling.
Comment #19
Serrano CreditAttribution: Serrano commentedWhen I try to apply the patch you linked me earlier this is the output:
patch: **** Only garbage was found in the patch input.
Comment #20
cilefen CreditAttribution: cilefen as a volunteer commented@Serrano Please read about this topic: https://www.drupal.org/patch/apply. The comment in #17 suggests you did not download the patch to the specified location. Please do not post your entire watchdog log in further comments. It is better to attach those as text files.
Comment #21
Serrano CreditAttribution: Serrano commentedNow it outputs this:
And it is the newest version of the patch.
Will do, thanks.
Comment #22
cilefen CreditAttribution: cilefen as a volunteer commentedYou have put the filename FieldStorageConfigStorage.php into the command, however I do not see that anyone on this issue suggested doing that.
Comment #23
Serrano CreditAttribution: Serrano commentedThanks for the heads up.
I tried to run
patch -p1 2786433-2-25.patch
but nothing happens. It doesn't give any erros but doesn't apply the patch either.Comment #24
cilefen CreditAttribution: cilefen as a volunteer commentedThat command is not correct. Please read https://www.drupal.org/patch/apply
Comment #25
Serrano CreditAttribution: Serrano commentedI've tried
and all output: No such file or directory.
Thanks by your pacience btw...
Comment #26
cilefen CreditAttribution: cilefen as a volunteer commentedIt may be obvious, but you must be in the root directory of the Drupal installation. Example:
Comment #27
cilefen CreditAttribution: cilefen as a volunteer commentedDo not bother with the git command. I don't think you are using git on this site.
As for
patch
, this error means you haven't referenced the proper path to the patch file.Comment #28
Serrano CreditAttribution: Serrano commentedOk i did it but the output was:
Comment #29
cilefen CreditAttribution: cilefen as a volunteer commentedIt would seem that
core/modules/field/src/FieldStorageConfigStorage.php
was altered from 8.2.3 and 8.2.4's version, because this should work otherwise.Comment #30
Serrano CreditAttribution: Serrano commentedHow do I know if it's patched?
Comment #31
alexpott@Serrano I think you modifications to the file have changed it - so what you need to do is download Drupal somewhere else and get the unedited file and put it there. I would just attach the patched file here for you but before I do that I'll give the opportunity to try to fix it for yourself so you can be confident of applying patches in the future. If you are still still after trying I (or someone else) will attach the complete patched file.
Comment #32
cilefen CreditAttribution: cilefen as a volunteer commentedIt seems #12 already answered that. I feel as though we are going in circles. Here are the changed functions:
Comment #33
Serrano CreditAttribution: Serrano commentedOk @alexpott, I have successfully patched the new file.
Do you want the
select * from watchdog order by wid desc limit 20;
output?Comment #34
Serrano CreditAttribution: Serrano commentedWe have progress!
Now when I try and go to my website it actually displays " Site inder maintenance " instead of an error.
I can also access the update.php page but when i click "Continue" i get the previous error I got before, "The website encountered an enexpected error. Please try again later."
All of this was in my ubuntu browser.
On the windows browser I get that error as soon as I try to open the site.
Comment #35
alexpott@Serrano re #33 yep we need to see the new error...
Comment #36
Serrano CreditAttribution: Serrano commentedWhere it is
Comment #37
alexpottIt doesn't look like the site is actually patched since that is the error you'd get when the site is not patched. Please find the entire file attached... you just need to copy it to core/modules/field/src/ and make sure it is called FieldStorageConfigStorage.php. Uploading to drupal.org will change the file name for security purposes.
Comment #38
alexpottAlso I'm confused about the file in #36 since the watchdog IDs are lower than in #13. Can you please run the query I gave you in #4 since that guarantees the most recent entries.
Comment #39
Serrano CreditAttribution: Serrano commentedI copied the file you uploaded and the output of
select * from watchdog order by wid desc limit 20;
is attached.Comment #40
Anonymous (not verified) CreditAttribution: Anonymous commentedIt could be that in the core/modules folder was no-core modules, like 'geolocation' and 'devel_node_access'?
Comment #41
Serrano CreditAttribution: Serrano commented@vaplas Just cheked and no. core/modules is untouched. All my modules are in /drupal-8.2.3./modules.
Comment #42
Anonymous (not verified) CreditAttribution: Anonymous commentedJust for cleary undestand, /drupal-8.2.3./modules contains a module 'geolocation'? And what a version of this module? And you have or not any structure for modules (e.g. 'contrib', 'custom', 'patches', 'untrusted' folders)?
Comment #43
Serrano CreditAttribution: Serrano commentedYes it does contain the module geolocation. How can i check the version without accessing the site?
No sub folders inside the modules folder. Just the modules.
Comment #44
alexpott@Serrano you need to install Drush (http://www.drush.org/en/master/) and use it to enable the geolocation module. Drush is a scripting tool for Drupal that allows you to enable modules from the command line. If you can't do that then we can explore other ways of fixing it.
Comment #45
Serrano CreditAttribution: Serrano commentedI only use Drush to download and enable modules.
I did
drush en geolocation
and it did enable it.Comment #46
alexpott@Serrano and is the site fixed or do you have a new error - you can use
drush ws
to look at the watchdog error log :)Comment #47
Serrano CreditAttribution: Serrano commentedNot yet fixed...
I get the the same error I did at the beggining. When I try and run update.php and click continue I get this "The website encountered an unexpected error. Please try again later."
Comment #48
Serrano CreditAttribution: Serrano commentedI ran
drush cache-rebuild
and the output was:I'm confused on "requires Drupal core 8+ to run"
Comment #49
alexpott@Serrano that suggests you are not running drush from within the root directory or your settings.php is not right. The fact update.php is allowing you to run suggests that where you ran drush was not quite right. Also so you can see the errors please add the following line to the bottom of you settings.php... it'll make everything easier to work out what is going on...
Comment #50
Serrano CreditAttribution: Serrano commentedI think drush is not connecting to my database because when i run
drush status
it does not display any Drupal Version.I've added that to my settings.php.
Comment #51
alexpott@Serrano and what message do you see when you run update.php?
Comment #52
Serrano CreditAttribution: Serrano commentedThe website encountered an unexpected error. Please try again later.
Comment #53
alexpottSo not a new error :) you need to have drush working correctly... you need to change your directory to
/home/afonso/public_html/drupal-8.2.3/
and run drush from there. Or dodrush -r /home/afonso/public_html/drupal-8.2.3 en geolocation
Comment #54
Serrano CreditAttribution: Serrano commentedComment #55
Serrano CreditAttribution: Serrano commentedI just went to my database in PhpMyAdmin and this was there:
Deprecation Notice in ./../php/php-gettext/streams.php#48
Methods with the same name as their class will not be constructors in a future version of PHP; StringReader has a deprecated constructor
Backtrace
./../php/php-gettext/gettext.inc#41: require()
./libraries/select_lang.lib.php#477: require_once(./../php/php-gettext/gettext.inc)
./libraries/common.inc.php#569: require(./libraries/select_lang.lib.php)
./index.php#12: require_once(./libraries/common.inc.php)
Deprecation Notice in ./../php/php-gettext/streams.php#84
Methods with the same name as their class will not be constructors in a future version of PHP; FileReader has a deprecated constructor
Backtrace
./../php/php-gettext/gettext.inc#41: require()
./libraries/select_lang.lib.php#477: require_once(./../php/php-gettext/gettext.inc)
./libraries/common.inc.php#569: require(./libraries/select_lang.lib.php)
./index.php#12: require_once(./libraries/common.inc.php)
Deprecation Notice in ./../php/php-gettext/streams.php#145
Methods with the same name as their class will not be constructors in a future version of PHP; CachedFileReader has a deprecated constructor
Backtrace
./../php/php-gettext/gettext.inc#41: require()
./libraries/select_lang.lib.php#477: require_once(./../php/php-gettext/gettext.inc)
./libraries/common.inc.php#569: require(./libraries/select_lang.lib.php)
./index.php#12: require_once(./libraries/common.inc.php)
Deprecation Notice in ./../php/php-gettext/gettext.php#36
Methods with the same name as their class will not be constructors in a future version of PHP; gettext_reader has a deprecated constructor
Backtrace
./../php/php-gettext/gettext.inc#42: require()
./libraries/select_lang.lib.php#477: require_once(./../php/php-gettext/gettext.inc)
./libraries/common.inc.php#569: require(./libraries/select_lang.lib.php)
./index.php#12: require_once(./libraries/common.inc.php)
Comment #56
alexpott@Serrano so you're going to need to do the following commands:
The first command will get your current config so you can reset it after re-installing the module since you'll need to add you google_map_api_key again.
Comment #57
Serrano CreditAttribution: Serrano commentedDid that and when I now run /update.php it gives me a warning:
Comment #58
alexpott@Serrano so you need to put the devel module in
/modules
... you can do this by doingdrush -r /home/afonso/public_html/drupal-8.2.3 dl devel
Comment #59
Serrano CreditAttribution: Serrano commented/update.php still displays the same.
Comment #60
cilefen CreditAttribution: cilefen as a volunteer commenteddevel_node_access is a separate module.
Comment #61
Serrano CreditAttribution: Serrano commentedThanks @cilefen, now that error is gone.
Although when I click Continue in update.php i still get the same...
Comment #62
alexpottStill get the same what? We can not see your screen.
Comment #63
Serrano CreditAttribution: Serrano commentedThe same as #52:
The website encountered an unexpected error. Please try again later.
Comment #64
Serrano CreditAttribution: Serrano commentedI don't know if this helps but i compared my /drupal-8.2.3/modules with my /drupal-8.2.4/modules (new drupal instalation) witch have the same modules installed and the /drupal-8.2.3 one has additional files. A composer.json and a composer.lock and a /vendor folder that the /drupal-8.2.4 doesn't. Just thought I'd let you know...
Comment #65
alexpott@Serrano do you still have the patch applied - I guess there is another module involved - like in #52 can you please give us the actual exception?
Also have you actually enabled the geolocation module? -
drush -r /home/afonso/public_html/drupal-8.2.3 en geolocation
maybe not.Comment #66
Serrano CreditAttribution: Serrano commentedRuntimeException: Unable to determine class for field type 'video_embed_field' in Drupal\field\FieldStorageConfigStorage->mapFromStorageRecords() (line 156 of core/modules/field/src/FieldStorageConfigStorage.php).
Yes, I just doubled cheked.
Comment #67
alexpottSo that is a different module and not the same error - when you report stuff we need all the information or we can't help - also since it is obvious that somehow lots of modules came disable during your upgrade you might try looking at what module are installed and which you know are should be... This error is telling you that https://www.drupal.org/project/video_embed_field should be installed.
Comment #68
Serrano CreditAttribution: Serrano commentedI'm sorry for that.
I enabled the video_embed_module and when i now run update.php and click continue i gel no error message! It says "no pending updates" and let's me get to my front page. But that's it. I cannot login nor go into any other pages of my site. I get this:
Not Found
The requested URL /drupal-8.2.3/user/login was not found on this server.
Apache/2.4.18 (Ubuntu) Server at 192.168.10.113 Port 80
Comment #69
alexpottDo you have a backup of your site prior to upgrading?
Comment #70
Serrano CreditAttribution: Serrano commentedI figgured it out. I must have deleted the .htaccess file. Copied it from the newer version and the site is back up! Thanks!
Comment #71
alexpottSo as far I can see there aren't any action points other than to get #2786443: \Drupal\field\FieldStorageConfigStorage::mapFromStorageRecords() can fail without a reasonable error in.
@Serrano I'm pretty sure if you had followed the instructions in core/UPDATE.txt then you would not have had these problems.
Comment #72
alexpottComment #73
Serrano CreditAttribution: Serrano commentedMost likely.
Comment #74
Serrano CreditAttribution: Serrano commentedI was getting an error each time i tried to enable a module in the drupal interface but i would go to ubuntu enable it there and everything would be fine. The ones the interface didn't let me i just add to delete the config from the database and again, everything would be fine. Now i ran into the following error and I don't have a clue what it might be.
The website encountered an unexpected error. Please try again later.
Symfony\Component\Routing\Exception\RouteNotFoundException: Route "view.media.media_page_list" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 187 of core/lib/Drupal/Core/Routing/RouteProvider.php)
Comment #75
cilefen CreditAttribution: cilefen as a volunteer commented#2820147: Menu link entry provided by media entity cause fatal error with media