Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pimcore not functioning properly #554

Closed
gladtobehere opened this issue Apr 15, 2016 · 13 comments
Closed

Pimcore not functioning properly #554

gladtobehere opened this issue Apr 15, 2016 · 13 comments

Comments

@gladtobehere
Copy link

Hi,
I installed pimcore and I was able to access the dahsboard however the moment the first page is loaded the console shows multiple errors saying the following :


[WARN] Unable to parse the JSON returned by the server
minified_javascript_core_4cddd8c5f8a96a56512acb9534a1a38b.js:5833
Error: You're trying to decode an invalid JSON String:
(…)


Preview to server response is as follows:


Fatal error: Call to a member function hasChilds() on null in /var/www/pimben/pimcore/modules/admin/controllers/ObjectController.php on line 58


Plus, I am not able to add objects, documents and can add only one class, which appears without a name and is stored in the database without a name which causes a mysql error because all entries have no name 'empty string' and leads to a duplicate entry error.

Pimcore is running on a LEMP server, PHP5.6 with all modules according to the system requirements are installed and enabled as welll. Nginx and php5-fpm and configured properly and are running normally. Access, read, write rights are all set as 775, owner of the pimcore directory is the user registered in the nginx configuration file. All the privileges for the pimcore database are set according to the guide found here:
[https://www.rosehosting.com/blog/install-pimcore-on-ubuntu/#comment-44663]

I have been struggling with this issue for a week now, and the fact that I am actually able to interact with the interface of pimcore makes it even frustrating. Any help is much appreciated. Thanks.

@brusch brusch closed this as completed Apr 15, 2016
@brusch
Copy link
Member

brusch commented Apr 15, 2016

Please use the issue tracker only for reproducible issues.
For support, please use: https://groups.google.com/forum/#!forum/pimcore

From the infos you provided, I was unfortunately not able to see any issue.
Please further debug this topic and provide us more details or try to consult our forums.

Thanks!

@gladtobehere
Copy link
Author

Hello,

I have been trying to consult your forums for a while now. I have received some feedback but nothing was really helpful enough and the last feedback I got was to use the configuration file provided by this link
[(https://www.scalescale.com/tips/nginx/pimcore-nginx-configuration/)]
which in turn leads to a white screen with no content whatsoever... the only additional info I can provide is the nginx server block for pimcore..
Please tell me what additional info you would possibly need to potentially work around this issue..

@brusch
Copy link
Member

brusch commented Apr 15, 2016

I need a step by step guide how to reproduce this problems.
With the given information it's simply not possible to do any diagnosis.

@gladtobehere
Copy link
Author

gladtobehere commented Apr 15, 2016

ok well I can try my best to explain it with as much detail as possible.

1.ran an apt-get update
2. made sure that all php modules are installed and enabled with php5enmod
3. made sure mysql server is up and running
4. created a new pimcore database with a username and password and privileges for the user
5. created a new directory for pimcore in /var/www
6. downloaded the pimcore zip file from the website
7. unzipped the contents of that file in the pimcore directory
8. created a new server block for pimcore in /etc/nginx/sites-available
9. set the root directive to point to the pimcore directory
10. made sure that the path to the socket file is correct
11. created a new pool for php5-fpm in pool.d
12. the reference to the socket file matches the one mentioned in the nginx server block for pimcore
13. ran a chmod -R 775 for the pimcore directory and it's subfolders
14 . ran a chown to match the user in the main nginx config file
15. created a symbolic link between sites-available and sites-enabled
16. ran a server config test which was successful
17 . restarted nginx, php5-fpm, mysql servers
18. navigated to the page /install
20. database details entered
21. admin account created
22 . pimcore installed and dashboard appears
23 . as soon as the first page was loaded the console on the side showed the afore mentioned errors
24. attempted to create classes, create documents and non worked.
25 . the side bar does not show the little home icon and creating pages does not work and returns an error dialog box saying "cannot create document"
26. ObjectController.php and ClassController.php are always referred to as far as the returned errors are concerned.

Please let me know if anymore details are needed. Thanks

@brusch
Copy link
Member

brusch commented Apr 15, 2016

Can you try it again using apache? Just to verify if it's an nginx specific problem.
Thanks!

@gladtobehere
Copy link
Author

If that really really is the only way to find a solution probably yes, but that would probably mean that I will have to scrap that whole stack I have running..

@brusch
Copy link
Member

brusch commented Apr 15, 2016

Is there anything in the error logs?
nginx, php, website/var/log/debug.log website/var/php.log ...?

Otherwise if have really no other idea.

@brusch
Copy link
Member

brusch commented Apr 15, 2016

If it still doesn't work, I think the only way to get a step further would be to enable xdebug and put a breakpoint at /var/www/pimben/pimcore/modules/admin/controllers/ObjectController.php on line 58 and see whats happening there.

@gladtobehere
Copy link
Author

debug.log
[2016-04-15 14:40:58] core.ERROR: Prevented access to /admin/ because there is no user in the session! {"server":{"USER":"www-data","HOME":"/var/www","FCGI_ROLE":"RESPONDER","SCRIPT_FILENAME":"/var/www/pimben/index.php","QUERY_STRING":"","REQUEST_METHOD":"GET","CONTENT_TYPE":"","CONTENT_LENGTH":"","SCRIPT_NAME":"/index$
[2016-04-15 14:56:10] core.ERROR: exception 'Exception' with message 'Class with ID doesn't exist' in /var/www/pimben/pimcore/models/Object/ClassDefinition/Dao.php:55 Stack trace: #0 /var/www/pimben/pimcore/models/Object/ClassDefinition.php(148): Pimcore\Model\Object\ClassDefinition\Dao->getById(0) #1 /var/www/pimben/$
[2016-04-15 14:56:21] core.ERROR: exception 'Zend_Db_Statement_Mysqli_Exception' with message 'Mysqli statement execute error : Duplicate entry '' for key 'name'' in /var/www/pimben/vendor/zendframework/zendframework1/library/Zend/Db/Statement/Mysqli.php:214 Stack trace: #0 /var/www/pimben/vendor/zendframework/zendfram$
[2016-04-15 14:56:21] core.ERROR: Array ( [message] => Mysqli statement execute error : Duplicate entry '' for key 'name' [method] => insert [arguments] => Array ( [0] => classes [1] => Array ( [name] => ) ) ) {"$
[2016-04-15 14:56:21] core.EMERGENCY: exception 'Zend_Db_Statement_Mysqli_Exception' with message 'Mysqli statement execute error : Duplicate entry '' for key 'name'' in /var/www/pimben/vendor/zendframework/zendframework1/library/Zend/Db/Statement/Mysqli.php:214 Stack trace: #0 /var/www/pimben/vendor/zendframework/zend$
[2016-04-15 15:21:13] core.ERROR: exception 'Zend_Db_Statement_Mysqli_Exception' with message 'Mysqli statement execute error : Duplicate entry '' for key 'name'' in /var/www/pimben/vendor/zendframework/zendframework1/library/Zend/Db/Statement/Mysqli.php:214 Stack trace: #0 /var/www/pimben/vendor/zendframework/zendfram$
[2016-04-15 15:21:13] core.ERROR: Array ( [message] => Mysqli statement execute error : Duplicate entry '' for key 'name' [method] => insert [arguments] => Array ( [0] => classes [1] => Array ( [name] => ) ) ) {"$
[2016-04-15 15:21:13] core.EMERGENCY: exception 'Zend_Db_Statement_Mysqli_Exception' with message 'Mysqli statement execute error : Duplicate entry '' for key 'name'' in /var/www/pimben/vendor/zendframework/zendframework1/library/Zend/Db/Statement/Mysqli.php:214 Stack trace: #0 /var/www/pimben/vendor/zendframework/zend$
[2016-04-15 15:21:29] core.ERROR: exception 'Zend_Db_Statement_Mysqli_Exception' with message 'Mysqli statement execute error : Duplicate entry '' for key 'name'' in /var/www/pimben/vendor/zendframework/zendframework1/library/Zend/Db/Statement/Mysqli.php:214 Stack trace: #0 /var/www/pimben/vendor/zendframework/zendfram$
[2016-04-15 15:21:29] core.ERROR: Array ( [message] => Mysqli statement execute error : Duplicate entry '' for key 'name' [method] => insert [arguments] => Array ( [0] => classes [1] => Array ( [name] => ) ) ) {"$
[2016-04-15 15:21:29] core.EMERGENCY: exception 'Zend_Db_Statement_Mysqli_Exception' with message 'Mysqli statement execute error : Duplicate entry '' for key 'name'' in /var/www/pimben/vendor/zendframework/zendframework1/library/Zend/Db/Statement/Mysqli.php:214 Stack trace: #0 /var/www/pimben/vendor/zendframework/zend$
[2016-04-15 15:22:09] core.ERROR: A field-collection needs a key to be saved! {"origin":"Admin_ClassController->fieldcollectionUpdateAction() on line 593","memory":" 11 MB"} []

php.log
PHP Fatal error: Call to a member function hasChilds() on null in /var/www/pimben/pimcore/modules/admin/controllers/DocumentController.php on line 61
[15-Apr-2016 15:22:29 Europe/Berlin] PHP Fatal error: Call to a member function hasChilds() on null in /var/www/pimben/pimcore/modules/admin/controllers/DocumentController.php on line 61
[15-Apr-2016 15:22:29 Europe/Berlin] PHP Fatal error: Call to a member function hasChilds() on null in /var/www/pimben/pimcore/modules/admin/controllers/AssetController.php on line 117
[15-Apr-2016 15:22:29 Europe/Berlin] PHP Fatal error: Call to a member function hasChilds() on null in /var/www/pimben/pimcore/modules/admin/controllers/AssetController.php on line 117
[15-Apr-2016 15:22:29 Europe/Berlin] PHP Fatal error: Call to a member function hasChilds() on null in /var/www/pimben/pimcore/modules/admin/controllers/ObjectController.php on line 58
[15-Apr-2016 15:22:29 Europe/Berlin] PHP Fatal error: Call to a member function hasChilds() on null in /var/www/pimben/pimcore/modules/admin/controllers/ObjectController.php on line 58

@brusch
Copy link
Member

brusch commented Apr 15, 2016

Did you installed the demo package or the empty RC2?

@brusch
Copy link
Member

brusch commented Apr 15, 2016

I think the problem ist the following entry in your log:

data","HOME":"/var/www","FCGI_ROLE":"RESPONDER","SCRIPT_FILENAME":"/var/www/pimben/index.php","QUERY_STRING":"","REQUEST_METHOD":"GET","CONTENT_TYPE":"","CONTENT_LENGTH":"","SCRIPT_NAME":"/index$
[2016-04-15 14:56:10] core.ERROR: exception 'Exception' with message 'Class with ID doesn't exist' in 

What is the content of your objects table? Is the column o_classId or o_className empty on a row where the column o_type is not folder?

Thanks!

@brusch
Copy link
Member

brusch commented Apr 15, 2016

The error in the log is thrown here:

$classRaw = $this->db->fetchRow("SELECT * FROM classes WHERE id = ?", $id);

Maybe you can put a breakpoint there to see which SQL is used and what $classRaw contains.

@brusch
Copy link
Member

brusch commented Apr 16, 2016

So it seems you finally solved the problem with the help of Igor and Johan:
https://groups.google.com/forum/#!topic/pimcore/ezqdLjpECxw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants