Author Topic: savecontent error!!  (Read 107371 times)

Offline Nicky

  • Posts: 88
  • Gender: Male
savecontent error!!
« on: January 13, 2014, 08:16:54 PM »
Happy New Year to all Bakers!

I'm trying to change loginname to login nom but, I get this error:

Administration Tools -> Language Edit
savecontent error!!

Sucessfully saved


And none of my changes are actually saved.

I'm using Version 2.8.2  Revision 1528

Any ideas how to fix this?

(I don't have any issues saving page content or receive any other error messages anywhere).

Regards,
Nicky

jacobi22

  • Guest
Re: savecontent error!!
« Reply #1 on: January 13, 2014, 08:30:29 PM »
this error messages means, that your input is too short (minimum 10 chars)
you can change the code in the file tool_save.php in line 93ff

originalcode
Code: [Select]
if($save_file) {
        if (strlen($savecontent)<10) {
                echo "savecontent error!!";
        }

new code
Code: [Select]
if($save_file) {
        if (strlen($savecontent)== '') {
                echo "savecontent error!!";
        }
« Last Edit: January 13, 2014, 09:47:41 PM by jacobi22 »

Offline Nicky

  • Posts: 88
  • Gender: Male
Re: savecontent error!!
« Reply #2 on: January 13, 2014, 09:12:57 PM »
Hello jacobi22,

Thanks, I get your info about the length of any login name but it is the text for the prompt called loginname that I want to try and and edit...

So I go here:

"Edit Website Baker System Language Files"

Then here:

353     $TEXT['USERNAME']    Loginname

If I try to edit and save that prompt as login-nom or pseudo-nom for example, I still get the same original error and, nothing in that language file changes.

My query has nothing to do with the actual length of the login name but simply changing the prompt called "loginname" to something else (in French with this site).

Regards,
Nicky

jacobi22

  • Guest
Re: savecontent error!!
« Reply #3 on: January 13, 2014, 09:37:54 PM »
i think, you dont understand correct - sorry  :wink:

i talk only from the module language edit, not about other wb-function like "minimum-chars in-username"

if you make a input , maybe to change a language variable like "$TEXT['USERNAME']", the script count the chars from your input and if your input has not a minimum from 11 chars (inclusive space, comma etc), the script stops

it has nothing to do with a login name, its only for the tool language edit

for example
you want to edit the language variable $TEXT['ADD']  -> the english text is "ADD", but the word "ADD" has only 3 chars, its too short for the script,

in you example you like to change the word LOGINNAME to login nome == 10 chars, but not more then 10 chars
if you change another word in the next lines, you have more then 10 chars and it works without error and error messages

thats my two solutions
1. change the code (see my first answer)
2. change more than one languages variables in the same time


Offline Nicky

  • Posts: 88
  • Gender: Male
Re: savecontent error!!
« Reply #4 on: January 14, 2014, 11:35:53 AM »
Quote
you can change the code in the file tool_save.php in line 93ff

I can find save.php and tool.php but I cannot locate tool_save.php

In what directory can I find tool_save.php please?

(WB 2.8.2  Revision 1528)

jacobi22

  • Guest
Re: savecontent error!!
« Reply #5 on: January 14, 2014, 01:14:08 PM »
the file tool_save.php is a part of the module (vers 0.91)
directory is /module/languageedit

but i found another point.
every php.ini has a setting called max_input_vars
this setting means , how many input fields are possible in a formular. the standard setting is 1000, but the module-script use more then 1000 input field in bigger language files like DE.php or EN.php (all files in the main language folder)
PHP cut the POST-Array, when its have more then 1000 vars. the file name for your language file was send as the last var in this POST-array, so its missing and the tool_save.php has nothing to do without a file name to write in it.

at all: this module doesnt work in the WB 2.8.4. This WB 2.8.4 use UTF8-coded Language files and the module Languages Editor cannot handle this files. See also here -> http://www.WebsiteBaker.org/forum/index.php/topic,26755.0.html

Offline Nicky

  • Posts: 88
  • Gender: Male
Re: savecontent error!!
« Reply #6 on: January 14, 2014, 09:05:32 PM »
Hi jacobi22,

So I guess then that I'll have to leave my intended language-mod, "as-is".

Nevertheless, many thanks for your research on this subject though.

Regards,

Nicky 

jacobi22

  • Guest
Re: savecontent error!!
« Reply #7 on: January 14, 2014, 09:25:33 PM »
you can change the langauage files with every editor like notepad, notepad++ etc
its also possible online with the Admin Tool AddonFileEditor (see here under DOWNLOADS) -> http://addons.WebsiteBaker.org/pages/en/browse-add-ons.php?id=02D8BA1

Offline Nicky

  • Posts: 88
  • Gender: Male
Re: savecontent error!!
« Reply #8 on: January 15, 2014, 01:27:41 PM »


Quote
Admin Tool AddonFileEditor (see here under DOWNLOADS) -> http://addons.WebsiteBaker.org/pages/en/browse-add-ons.php?id=02D8BA1
Well, I've just changed Loginname into Login-Nom which took all of about 5 seconds and it's showing up in the front-end perfectly. Thanks jacobi !  :-D  :-D


jacobi22

  • Guest
Re: savecontent error!!
« Reply #9 on: January 15, 2014, 02:37:44 PM »
i understand  :wink:

whats Language is "Login nom"? Norsk?

Offline Nicky

  • Posts: 88
  • Gender: Male
Re: savecontent error!!
« Reply #10 on: January 15, 2014, 03:10:56 PM »
Login-Nom is Franglais (Half EN + Half FR)  :wink:
https://en.wikipedia.org/wiki/Franglais