joomla installing new language DateTime::__construct(): Failed to parse time string (jerror)
Asked Answered
W

7

8

I am a fresh installation of Joomla 3.1 running on my home computer. My environment is Ubuntu 12.10 with apache server, php 5.4.6 installed. Since installing the system, no I am just trying to install more languages through the language manager: enter image description here

As you can see, the 2 additional languages that I wanted show up in the list, but after selecting each language, and clicking "Install", I was led to a page with this message:

DateTime::__construct(): Failed to parse time string (jerror) at position 0 (j): The timezone could not be found in the database

With a button to just go back to the control panel. I was suprised to see these languages show up in the list.

I also saw this message when I tried (and failed) to install my first component - it was a component to embed google maps in articles.

Anyway, I haven't been able to find a solution for this problem online, I was wondering if anyone out there knows what the problem is. Any help is greatly appreciated!

Thanks!

EDIT

The problem in my case turned out to be that some on my directories where un-writable. I went to the "directory permissions" tab under "System Information", and tried to make sure that all the directories were writable. When i first opened it, all the directories in the "administrator" directory were not writable, and we changed them to be writable through the shell in linux, then i was able to install the new languages without the error message above.

enter image description here

Willpower answered 19/5, 2013 at 8:1 Comment(0)
F
18

This is the most stupid bug in Joomla 3. I wasted 2 days trying to solve this out and I found that the problem was that the log and tmp paths were not set correctly on the configuration.php

Don't worry there's nothing wrong with your Date/Time/Timezone/Localization settings. It's just a stupid silly message that doesn't relate to the actual problem.

To save your time I recommend you get the full path using this script:

<?php
$dir = dirname(__FILE__);
echo "<p>Full path to this dir: " . $dir . "</p>";
?>

Create a PHP file and upload it to Joomla root. It will get you the path correctly

My path looked exactly the same except that there was an uppercase letter screwing everything up.

Note that this error could happen if the folders doesn't have the correct permission (not writable)

Finstad answered 19/5, 2013 at 8:19 Comment(10)
Thanks Ahmad, I checked my configuration.php and the logs and tmp paths are correct already... Not sure if maybe it is another problem with my config file.Willpower
Yes I just did, and it path is exactly the same, except there is a $ character on the end of the output from dirname(__FILE__), but I think that is just a problem with my shell. SO yes the pathname is already correct.Willpower
OK can you check the update and added? Also try adding this $ I think it is the problem.Finstad
I am not sure about that $ ... PHP isn't suppose to echo it I thinkFinstad
I checked system info, and the log and tmp files are writable, but I see that the language/overrides is not writable, and all the administrator folders are not writable... Do you think it could have something to do with the fact that my session handler is database? The error says coundn't find timezone in database.Willpower
let us continue this discussion in chatFinstad
As a start I would say fix the permission issues. I don't think it's related to the timezone or the database to be honestFinstad
I changed all the permissions so that the folders were writable, and that solved the problem!Willpower
Perfect, it isn't a faulty write permission issue then. My case was wrong path and yours is un-writable directories. I will file a bugFinstad
just been cloning a J3 site from one server to another and ran into this issue... it was the tmp and log paths in the config file that I had neglected to change. It looks like you saved me days of work! Thanks.Stimulate
P
5

I have a successful answer for this problem in joomla 3x

DateTime::__construct(): Failed to parse time string (jerror) at position 0 (j): The timezone could not be found in the database

  1. Set the correct path to your joomla site tmp folder

    Log in to joomla administrator Panal System -> global Configuration -> Server

    and give the correct path ("Path To Tmp Folder")

    EX: http://www.yourDomain.com/tmp

  2. Path to Sloving PHP file

    libraries/joomla/filesystem/folder.php

    Change Online 260 with this code

__METHOD__ . ': ' . JText::_('JLIB_FILESYSTEM_ERROR_COULD_NOT_CREATE_DIRECTORY'). 'Path: ' . $path, JLog::WARNING, 'jerror'

Palmore answered 16/7, 2013 at 5:21 Comment(1)
What if you get the error when trying to login to the admin panel? I keep getting the error and the login credentials are correct.Littoral
A
2

Ok just had the same problem, was helping a friend who couldnt get his new joomla 3 site to install a new template. Every thing looked good in system infomation, all writeable but on looking further I found although plugins/ was marked as writeable I had to change all the permissions for each folder in plugins/ and it worked straight away. Hope this helps.

Aguayo answered 18/6, 2013 at 4:3 Comment(0)
C
2

I was able to fix this by creating /tmp and /log directories one level above the website root and making them writable.

Example:
/home/sitename/log
/home/sitename/tmp
Chirk answered 22/7, 2013 at 14:8 Comment(0)
S
2

this problem cause of changing the host of your joomla and the address of /tmp and /log directory in configuration.php file need correction with new address

Scintillation answered 7/6, 2016 at 4:21 Comment(1)
This should be a comment.Imprest
O
1

This issue can be fixed easily.

go to plugins/system/yt/includes/libs/yt-minify.php

go to this line :

$this->optimizeFolder  = $app->getTemplate(true)->params->get('optimizeFolder', 'yt-assets');

and change it to :

$this->optimizeFolder = $app->getTemplate(true)->params->get('optimizeFolder', 'yt-assets');
$this->optimizeFolder = JPATH_ROOT.'/'.$this->optimizeFolder;

hope it works!

Overboard answered 12/6, 2013 at 8:19 Comment(0)
C
0

If you are using Admin Tools it can cause this to appear when you use the wrong password when trying to login as admin (because it locks directories). Also, it'll give you a heart attack.

Contusion answered 30/4, 2014 at 23:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.