Edit/Add block error

Permalink
I deleted some tables from the database to remove some 'page types' that would not delete. When i now try to add or edit a block i get this error:

Warning: include(/home/worshipf/public_html/packages/display_page_name/blocks/page_name/edit.php) [function.include]: failed to open stream: No such file or directory in /home/worshipf/public_html/updates/concrete5.6.2.1_updater/concrete/core/libraries/block_view.php on line 311

Warning: include() [function.include]: Failed opening '/home/worshipf/public_html/packages/display_page_name/blocks/page_name/edit.php' for inclusion (include_path='/home/worshipf/public_html/libraries/3rdparty:/home/worshipf/public_html/updates/concrete5.6.2.1_updater/concrete/libraries/3rdparty:.:/usr/lib/php:/usr/local/lib/php') in /home/worshipf/public_html/updates/concrete5.6.2.1_updater/concrete/core/libraries/block_view.php on line 311

deanhawthornthwaite
 
deanhawthornthwaite replied on at Permalink Reply
deanhawthornthwaite
Just tried to add a block and am getting a different error which looks like it's to do with google docs viewer.
I had to manually delete this from the database as it started to not work and I couldn't get rid of it.

Warning: require_once(/home/worshipf/public_html/updates/concrete5.6.2.1_updater/concrete/blocks/google_docs_viewer/controller.php) [function.require-once]: failed to open stream: No such file or directory in /home/worshipf/public_html/updates/concrete5.6.2.1_updater/concrete/core/libraries/loader.php on line 218

Fatal error: require_once() [function.require]: Failed opening required '/home/worshipf/public_html/updates/concrete5.6.2.1_updater/concrete/blocks/google_docs_viewer/controller.php' (include_path='/home/worshipf/public_html/libraries/3rdparty:/home/worshipf/public_html/updates/concrete5.6.2.1_updater/concrete/libraries/3rdparty:.:/usr/lib/php:/usr/local/lib/php') in /home/worshipf/public_html/updates/concrete5.6.2.1_updater/concrete/core/libraries/loader.php on line 218
JohntheFish replied on at Permalink Reply
JohntheFish
Tables in the database usually have relationships with other tables. By deleting some you will have broken those relationships and hence caused errors where such relationships are expected. You may also have left the core or addons making direct enquiries into those tables and failing because they don't exist.

You should restore the database from a backup made before you deleted the tables.
deanhawthornthwaite replied on at Permalink Reply
deanhawthornthwaite
Hi JohntheFish!

Thanks for explaining that.

Fortunately i did do a backup, however when i click restore the screen goes white (blank) and stays like that with no confirmation. if go back to the site and try to add a block the problem is still there?
JohntheFish replied on at Permalink Reply
JohntheFish
You will need to install the backup from phpMyAdmin.
deanhawthornthwaite replied on at Permalink Reply
deanhawthornthwaite
OK i deleted the database and imported again using phpmyadmin.
no change to the problem. I then went and restored back 4 version of database way before any problems, problem is still there.

When i try to access index.php/dashboard/blocks/types/ i ge this error:


Warning: require_once(/home/worshipf/public_html/packages/google_docs_viewer/blocks/google_docs_viewer/controller.php) [function.require-once]: failed to open stream: No such file or directory in /home/worshipf/public_html/updates/concrete5.6.2.1_updater/concrete/core/libraries/loader.php on line 218

Fatal error: require_once() [function.require]: Failed opening required '/home/worshipf/public_html/packages/google_docs_viewer/blocks/google_docs_viewer/controller.php' (include_path='/home/worshipf/public_html/libraries/3rdparty:/home/worshipf/public_html/updates/concrete5.6.2.1_updater/concrete/libraries/3rdparty:.:/usr/lib/php:/usr/local/lib/php') in /home/worshipf/public_html/updates/concrete5.6.2.1_updater/concrete/core/libraries/loader.php on line 218
JohntheFish replied on at Permalink Reply
JohntheFish
Since the database backup, have you uninstalled any addons?

Such an error is typical of an addon/block being installed, but the package files missing.
mhawke replied on at Permalink Best Answer Reply
mhawke
As JohntheFish mentioned, the contents of the database must match the physical files or things crash quickly. If this were my system, I would try re-installing the Google Docs Viewer and the Display Page Name packages and any other packages you may have inadvertently deleted from the database OR that you deleted the physical files from your server.

If an add-on is giving you trouble and you want to remove it from your site, always remove the package from within the Dashboard and let concrete5 remove the physical files if you want them gone as well. That way all the relationships that concrete5 keeps in the database are maintained.
deanhawthornthwaite replied on at Permalink Reply
deanhawthornthwaite
Thanks guys, I realise I had broken it, and in future will not mess with the database manually. I did try and delete the google docs add-on through concrete5 but it would not go.

Anyhow, a friend has now fixed it for me so all is well.

Cheers, Dean.
mhawke replied on at Permalink Reply
mhawke
Glad to hear that it's working again. Would it be possible for your friend to let us know what the solution was? These forums are not very useful unless the solution is posted.
bvcreative replied on at Permalink Reply
bvcreative
Hi chaps,

This was a deceptively simple fix actually... I simply restored the expected package files to the /packages/ directory!

The Google Docs Viewer is a free block, so I was able to download an archive from the add-ons store and extract it into the correct location.

Phil