Fatal Error: german language-pack

Hi

I´ve got a problem by using the german language-pack. If it´s active I always get a "fatal error" each second site. Yesterday it happened the first time, the days before it worked.. That´s the message:

----------------------------------------------------------------------------------------

Schwerwiegender Fehler.

Die Weiterleitung kann nicht durchgeführt werden, da der Seiten-Header bereits gesendet wurde. Die Ausführung wird sicherheitshalber gestoppt. Bitte gehe zu http://docs.elgg.org/ für weitere Informationen.

SecurityException Object
(
[message:protected] => Die Weiterleitung kann nicht durchgeführt werden, da der Seiten-Header bereits gesendet wurde. Die Ausführung wird sicherheitshalber gestoppt. Bitte gehe zu http://docs.elgg.org/ für weitere Informationen.
[string:Exception:private] => exception 'SecurityException' with message 'Die Weiterleitung kann nicht durchgeführt werden, da der Seiten-Header bereits gesendet wurde. Die Ausführung wird sicherheitshalber gestoppt. Bitte gehe zu http://docs.elgg.org/ für weitere Informationen.' in /home/webpages/lima-city/yorecords/html/COMMONSOUNDS/engine/lib/elgglib.php:151
Stack trace:
#0 /home/webpages/lima-city/yorecords/html/COMMONSOUNDS/index.php(22): forward('activity')
#1 {main}
[code:protected] => 0
[file:protected] => /home/webpages/lima-city/yorecords/html/COMMONSOUNDS/engine/lib/elgglib.php
[line:protected] => 151
[trace:Exception:private] => Array
(
[0] => Array
(
[file] => /home/webpages/lima-city/yorecords/html/COMMONSOUNDS/index.php
[line] => 22
[function] => forward
[args] => Array
(
[0] => activity
)

)

)

[previous:Exception:private] =>
)

----------------------------------------------------------------------

Can somebody help me please?

  • @theYoRecords: are you sure this is due to the German Language Pack? This error message is only the German translation of an error message that would otherwise show in English. What if you switch the language setting of your site to English? Do you still get the same error message or not?

    The real reason for this error message is most likely caused by another plugin or theme that you have installed on your site that includes a faulty implementation of a page forward.

  • " The forwarding can not be performed because of the pages header was already sent. The execution is stopped for safety reasons. Please go to http://docs.elgg.org/ for more information..."

    *IS an issue with the File that Causes this Message; and Nothing to do with Page Forwards, etc.

    And if it is the language file - then that file does have a issue.

    I have created /re-created this error situation in testing by deliberately coding some particular PHP statements and then determined what exactly causes Elgg to to tis situation as a 'Security Issue'.

    First - that language file itself should be studied -- for anomalies to be corrected -- Most likely encodng issues.

  • Thanks for your answers.

    @iionly:

    The error message just appears with the german language pack. When I use the english one there´s no problem.

    @.DhrupDeScoop:

    But why does this happen suddenly? Until now everything worked. And I used the german language pack since I started using Elgg.

  • why ? read the possible reasons already above ;-) you're in for some debugging ;-O

  • I'm using the language files without ever coming across this issue. On the other hand I've got this error message in a test installation (in English) when I tested the Facebook theme plugin when accessing the index page.

    Have you upgraded Elgg, upgraded or installed any plugin and/or the language pack recently and has the problem only occured since then? Have you modified any language file? If you think you haven't changed anything, it might help to copy the language files to your server and replace the old de.php files nonetheless. Maybe some file got corrupted at uploading it and the error only started to show now.

  • Now I found a bug in a plugin (ReverbNation Music Player), and adjusted it. But it didn´t change anything.

    Before I did that, I tried to run the german language pack one more time, and it was worse than before. Now the complete upper part of the site is displayed incorrect... I hope I won´t become worse...

    I didn´t change that much on the site, unfortunately I´m not well versed with PHP. I only changed two things:

    -I replaced the Elgg-Logo/Link in the elgglib.php (I just replaced the picture in the _graphics-directory with a equal one, and replaced the link with my own).

    -I put my own headline instead of the generated one in the header_logo.php.

    Today I clicked on "upgrade" by mistake because it´s got a bad german translation.. But this can´t be the cause, the error occured before..

    The point is: the error isn´t always the same. It´s always "Schwerwiegender Fehler", but the codes beneath are different. Last time it was:

    #0 /home/webpages/lima-city/yorecords/html/COMMONSOUNDS/actions/usersettings/save.php(11): forward(-1)
    #1 /home/webpages/lima-city/yorecords/html/COMMONSOUNDS/engine/lib/actions.php(104): include('/home/webpages/...')
    #2 /home/webpages/lima-city/yorecords/html/COMMONSOUNDS/engine/handlers/action_handler.php(20): action('usersettings/sa...')
    #3 {main}
    [code:protected] => 0
    [file:protected] => /home/webpages/lima-city/yorecords/html/COMMONSOUNDS/engine/lib/elgglib.php
    [line:protected] => 151
    [trace:Exception:private] => Array
    (
    [0] => Array
    (
    [file] => /home/webpages/lima-city/yorecords/html/COMMONSOUNDS/actions/usersettings/save.php
    [line] => 11
    [function] => forward
    [args] => Array
    (
    [0] => -1
    )

    )

    [1] => Array
    (
    [file] => /home/webpages/lima-city/yorecords/html/COMMONSOUNDS/engine/lib/actions.php
    [line] => 104
    [args] => Array
    (
    [0] => /home/webpages/lima-city/yorecords/html/COMMONSOUNDS/actions/usersettings/save.php
    )

    [function] => include
    )

    [2] => Array
    (
    [file] => /home/webpages/lima-city/yorecords/html/COMMONSOUNDS/engine/handlers/action_handler.php
    [line] => 20
    [function] => action
    [args] => Array
    (
    [0] => usersettings/save
    )

    )

    )

    [previous:Exception:private] =>
    )

    I really don´t know what to do..Strange that it only happens in the german language pack. And the fact that PHP isn´t my best friend doesn´t make it easier to solve the problem.. I´ll try to recopy the language pack, but don´t think that this is the point. If it is I´ll post it here in half an hour.

  • Nudeler2

    @theYoRecords

    One question: did you change any german language file and saved it with notepad?

    In the beginning I had this problem too.

    I then used another editor (PsPad editor) and saved the file in format UTF8.

    If so, then try this!

  • I don't think that it's a coincidence that you modified the files defining the header of your site and then get errors telling you that something is wrong with sending the header afterwards. I don't know why this only happens with the German translations being used, but as you said they worked without problems before and you haven't changed anything in the language files. So, I don't think they are the problem. The German output is only the message telling you there is a problem while the real problem is described afterwards. The reason why the error message is different each time is because it depends from where the forward is coming from. Still, the same would be the header being used. The error message might not mention this clearly enough but I think it might be worth examining the modifications you have made. It could easily be a problem with the file encoding of the header files that might have been changed unintentionally by saving your changes in these files. You could test if the header files are causing the issue by re-installing the original files from the Elgg zip archive to see if the error will vanish then. If it does, you can try to figure out what you might have done wrong for the error to appear. If the error still occurs with the original files, you know at least the changes are not the reason for the error message.

    By clicking on "Upgrade" in the admin section nothing bad happens. If you haven't upgraded your site to a new Elgg version only the cache is flushed. Though this could also lead to all modifications you made in any files to take effect, if these files have been cached before. If this results in an error to appear suddenly this has nothing to do with performing the "Upgrade", because the changes have already been made in the files. If not triggering them to take effect by clicking on "Upgrade" they would have started to take effect when you would have enabled/disabled a plugin the next time as the cache is flushed then also.

    When making modifications in files it's best to disable the Elgg caching mechanisms to see any changes immediately. Best would be to test modifications in a safe test installation anyway.

  • Hi, did you -by chance- use the translation editor from Jerome Bakker (it's "merge" functionality in particular)? Or did you translate something manually and used an un-escaped special character (e.g. ä,ü,ö)?

    I am asking because I just screwed a test-site by doing both..

  • Thank you all very much!! Now the problem´s solved. Some of the files were saved as UTF-8, and some as ANSI. I first saved all language-files as UTF-8, then the error occured in both language-packs. So I saved them all as ANSI and now it works.

    But now another problem occured: All characters like ü,ö, or ß are not shown correctly. They all are replaced now.. I guess I have to save the german files as UTF-8 and the english ones as ANSI?