Loading...
 
Features / Usability

Features / Usability


Custom Header and Java

posts: 122 United States

I added some custom code in the header and java boxes in the Look and Feel menu. Something was incorrect, and now I'm getting an error message, and the page won't load.

I need to delete the code, but can't find it in the database. Does anyone know where it is located?

posts: 214

Use phpmyadmin to access your Tiki database and browse the "tiki_preferences" table. The "name" column contains the names of the Customization options, some of the names are:

feature_custom_html_head_content
header_custom_js
header_custom_css
feature_endbody_code

The header_custom_js is probably the one you are looking for. If there is a row with that value in the name column, edit that row and remove the code you added.

I tried to help someone else with a very similar problem in an earlier thread. Some of the information in that thread might be of interest to you: http://tiki.org/tiki-view_forum_thread.php?comments_parentId=44013

I also contacted him directly and offered to help, but he decided to move his site to ning, so we never did find a solution.

I hope you have better luck.

Tom


posts: 122 United States

The code no longer exists in my database. I've deleted it, and done a search to make sure there are no other references.

The problem is not fixed though, and I wonder if it has to do with clearing the cache. I obviously can't get to the site, so is there any other way to clear the cache? Maybe via the database?

posts: 214

I recreated this problem in an up to date Tiki 9. I was able to clean up the database and cache, and then the tiki pages were able to load again.

In Look and Feel/Customization I added the string "{test}" to

Custom CSS:
Custom HTML Content:
Custom End of Code:
and
Custom javascript:

And the result was error message 500 when I tried to load any pages. I then used phpmyadmin to browse the tiki_preferences table and deleted the rows with the following column names:

header_custom_js
header_custom_css
feature_custom_html_head_content
feature_endbody_code

Then I manually cleared the cache files:

In templates_c/ delete everything but: index.php
In temp/public/ delete everything but: .htaccess and index.php
In lib/test/core/temp/cache/ delete everything but: index.php
In modules/cache/delete everything but: index.php and README
In temp/cache/ delete everything but: index.php

To clear the folders, I used these comands:

Copy to clipboard
ls -1d ./templates_c/* |grep -v -e index.php | xargs /bin/rm ls -1d ./temp/public/* |grep -v -e index.php -e .htaccess | xargs /bin/rm ls -1d ./lib/test/core/temp/cache/* |grep -v -e index.php | xargs /bin/rm ls -1d ./modules/cache/* |grep -v -e index.php -e README | xargs /bin/rm ls -1d ./temp/cache/* |grep -v -e index.php | xargs /bin/rm

If there were no files to be deleted in one of those folders, you will get the error message:
ls: ./folder/*: No such file or directory
/bin/rm: missing operand

You could also delete the files using FTP, if that was all you had access with.

After doing that, the pages loaded successfully.

Tom

posts: 122 United States
Thanks for all the help guys. I was able to go into the database and delete the code. Then I went into the File Manager, found the Cache folder, and deleted the files. The site then worked.

Upcoming Events

1) 
Tiki birthday
2)  19 Oct 2023 14:00 GMT-0000
Tiki Roundtable Meeting - October
3)  16 Nov 2023 14:00 GMT-0000
Tiki Roundtable Meeting - November
4)  21 Dec 2023 14:00 GMT-0000
Tiki Roundtable Meeting - December
5)  18 Jan 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  15 Feb 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7)  21 Mar 2024 14:00 GMT-0000
Tiki Roundtable Meeting
8)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting