Modified: 09th Sep 11 |

Solutions to Problems

Have you ever had a technical problem you couldn't find an answer for, using Google or Bing or other web search engines? - I have! And somehow i managed to solve those problems either by intense research, luck or maybe I was just being dumb in the first place, and suddently realized the obvious solution to the 'problem'.

Anyways, in all cases, the first thing I do when i run out of ideas for possible solutions, is to ask Google, and to help Google and other search engines to find the answers for everyone else, I decided to dedicate this page to solutions to various problems I encounter.


LaTeX Build Problems using TexLive and Rubber on ArchLinux

Attempted to build foo.tex using:

$ rubber foo.tex

got error:

/usr/share/texmf-dist/tex/latex/pdftex-def/pdftex.def:385: Package pdftex.def Error: PDF mode expected, but DVI mode detected!
/usr/share/texmf-dist/tex/latex/pdftex-def/pdftex.def:385: leading text:     }\@ehc

Solution:$ rubber -p foo.tex

CMS Made Simple - TinyMCE strips character entities

Whenever character entities are inserted with WYSIWYG turned off, those character entities will be converted to characters as soon as TinyMCE is turned on again. This is especially troublesome when it converts   into an ordinary space.

In the admin panel, navigate to here: Extensions → TinyMCE WYSIWYG → Advanced (tab) → Extra configuration (text field). In that text field, insert the following code on its own line:

entity_encoding : "named"

Upgrading Piwik from 1.1.1 to 1.2 Can't Drop index_idsite_date_config

When attempting to perform an automatic upgrade of the piwik database you get a long error message telling you that an "alter table" operation failed, because an index could not be dropped.

Got error:

Error trying to execute the query 'ALTER TABLE `log_visit`
The error was: SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP 'index_idsite_date_config'; check that column/key exists


Locate where you installed piwik and open the script piwik\core\Updates\1.2-rc1.php then remove the lines:

DROP INDEX `index_idsite_date_config`,
DROP INDEX `index_idsite_datetime_config`,

They are around line 24 in the script.

Then save, and ask piwik to run the upgrade script again.