Edit Toolbar Disappeared

Permalink 2 users found helpful
Hi. I'm quite new to C5, and was getting along well with it. However, in the last 24 hours I have hit a major problem - the edit toolbar has disappeared. There is still the blank area at the top of the screen where the toolbar icons should be when viewing pages, but nothing else. I have searched the forums in vain for an answer, so would really appreciate any help anybody can give, as I'm at my wits end!

Problem headlines are:
1) Edit buttons disappeared after doing some work trying to enable pretty UR:s (never again!)
2) I'm using the Natural Concrete theme. I have re-installed this theme, and have also switched back and forth to other themes, with no joy.
3) I have checked header.php and footer.php as per other forum advice, and they are both looking fine.
4) I am using Chrome, but have tested in IE9 and Safari (on iPad) and still no edit buttons showing.
5) After playing with pretty URLs, and then having the initial problems with the edit toolbar, I logged out. When I tried to log back in again, my admin password wasn't recognised. I was able to re-set it, but now I don;t seem to be able to make any changes to permissions (I have switched to 'advanced' to see if there were any problems with this).

Any help would be massively appreciated!

 
okapi replied on at Permalink Reply
okapi
Maybe this line of code is missing in the html head section of your theme?

<?php Loader::element('header_required'); ?>


Cheers,
Michael
sweigh5001 replied on at Permalink Reply
Hi, Michael.

Thanks for the response. Are you referring to header.php?
Mainio replied on at Permalink Reply
Mainio
Yes, he's referring to that file but I don't think this is because of that.

Probably you can already find that line from your header.php but especially if you have recently upgraded concrete5, you need this in your footer.php:
<?php Loader::element('footer_required'); ?>


Best,
Antti / Mainio
sweigh5001 replied on at Permalink Reply
Hi. Thanks for the further help. I've added the line to the header.php file, but no joy. As mentioned in my opening post, it does seem to be something universal affecting all themes now - swapping between themes and re-loading themes dopes not help at all. It's as though, even though I'm the super-user, I've lost all permissions to edit individual pages...
Mainio replied on at Permalink Reply
Mainio
If you've added both of those lines, the one for header.php and also the one for footer.php, then there is something site-specific probably blocking the JavaScript to load.

You should look into your browser developer console to see what JavaScript errors it produces. It depends on your browser where you can find that.
sweigh5001 replied on at Permalink Reply
Hi, Mainio.
Thanks for helping. I'm using Chrome. I've checked in the settings and all sites are allowed to run Javascript.

All of these problems have started after switching to pretty URLs, which looking around the forums seem to be more of a curse than a help. Is there some code I should be adding in the htaccess file that might help me?
Mainio replied on at Permalink Reply
Mainio
Ok, then you should press on that site CTRL+SHIFT+J and a developer console will appear on the bottom of your browser. Leave it there as-is and reload the page. You will probably get some text there that is in red color and it means you get JavaScript errors that are blocking rest of the JavaScript in C5 to load.
sweigh5001 replied on at Permalink Reply
Hi, Mainio.

Done that and reloaded my home mage (mrmacro.net) while logged in to C%. I got two red error lines ('uncaught syntax error - expected token'), and they relate to:

1)http://www.mrmacro.net/index.php/tools/required/i18n_js

2)http://www.mrmacro.net/index.php/tools/required/page_controls_menu_js?cID=1&cvID=&btask=&ts=1337083319

This is all Greek to me, so any ideas what I need to do with this information?

Many thanks for your help - I feel I can see light at the end of the tunnel now!
Mainio replied on at Permalink Reply
Mainio
You have something added to some included files in concrete5 that should not be there. At least your /config/site.php is messed up and probably also some other file.

You should contact your developer to fix these up and tell him to follow concrete5 conventions and not e.g. include anything additional in index.php or config/site.php and let concrete5 do its job.

And by the way the configs issue is quite big security hole currently on your site. I could probably hack into your database with the information I see there if I wanted to.
sweigh5001 replied on at Permalink Reply
Hi, Mainio.

Well there has been no development. I'm using a theme and one add-on from the marketplace, and the only messing around I've done is the pretty URLs, and to add the 'advganced permissions' setting to site.php.

Should I be trying to search for the two files mentioned in the JS error messages?
Mainio replied on at Permalink Reply
Mainio
Nope, I think you will find nothing wrong with those files.

At least your site.php is wrong because it contains
<!--?php


intead of
<?php


But you probably have it also under that correctly (because your site is loading after all), so the part that is wrapped into HTML comments section, you should remove there.

And also you have some add-on or something that is adding some custom CSS there on top of your page for each requests (also those that are not requests for HTML pages) that should not be there.

I cannot say how exactly you can fix there, that is the reason I suggested contacting your developer. This is basically all I can do to help.
sweigh5001 replied on at Permalink Reply
Hi, Mainio.

Well if I adjust the php code, the site won't load. Can you specify which bit of code you are referring to in the HTML code that I need to remove, please?
Mainio replied on at Permalink Reply
Mainio
Not without seeing the code. And posting it here as-is opens you up for security threads with your credentials available on a public forum.
sweigh5001 replied on at Permalink Reply
So are we still talking about the site.php file, or other files? I'm very tempted to post a copy of my code for you, as otherwise I'm completely stuck. As mentioned, I don't have a developer. I have simply installed C5 through my hosting package, loaded a theme and add-on from the marketplace and edited pages as normal. Everything was working fine until I tried pretty URLs!
Mainio replied on at Permalink Best Answer Reply
Mainio
First you should fix your config/site.php and after that see if there are still some other files you need to worry about.

Your site.php file should look something like this, nothing else than this (or you can have your own configurations but they all should be inside the PHP-block of that file):
<?php 
define('DB_SERVER', 'db_server_address');
define('DB_USERNAME', 'db_username');
define('DB_PASSWORD', 'db_password');
define('DB_DATABASE', 'db_database');
define('PASSWORD_SALT', 'y3u53hEGRy4qayhYHSAE34744hwyheswaeyuY2qeh5e5hAyah45u4whyw4AGe453');
define('YOUR_CUSTOM_CONFIG', 'custom_config_value');
define('YOUR_CUSTOM_CONFIG2', 'custom_config_value2');


The other part is not probably coming from your site.php though so fixing that will probably only fix one part of your problem.

And really this is all you should have in that file. If you see e.g. "<html>" or "<body>" or "<!-- HTML COMMENT -->" in that file, that is all wrong.
sweigh5001 replied on at Permalink Reply
Mainio,

A million thanks. I've just adjusted the site.php file as you suggested, and my edit buttons are back! I honestly do not know how all that html crap got into the file, but it is gone now.

Thank you so much for your patience, time and help,
Simon.
Rob7 replied on at Permalink Reply
Thanks for this suggestion. I've had the same problem and this pointed me to the right place. If it helps anyone else, in my case I had added the following to site.php as it was recommended elsewhere as a solution to an unrelated issue.

header("HTTP/1.0 404 Not Found");


Removing it fixed this problem and did not affect the other one(!).
lancewash replied on at Permalink Reply
I have also found that that a jQuery conflict causes this problem. Because the footer loader adds jQuery if you also load jQuery a conflict can arise. When I removed my own reference to jQuery my issue was fixed.
gour replied on at Permalink Reply
gour
I've the same problem, using latest C5, with default Greek Y. theme, Pro Blog installed...

Here is what the console says:

Please specify a ShareThis Publisher Key For help, contact support@sharethis.com
buttons.js (line 1)
prettyPrint is not defined
[Break On This Error]    
prettyPrint();



Any idea what might be wrong?


Sincerely,
Gour
clocktower replied on at Permalink Reply
clocktower
The issue is related to ProBlog. We are looking into this as well.
mstrix replied on at Permalink Reply
Also, check your new created blocks, and their templates. If you was connect custom tamplate for block or stack.

Sry for my eng! =)