Can't edit files Can't edit files
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Can't edit files

Started by Font Color Red, April 09, 2006, 02:59:33 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Font Color Red

When I go into edit a file, in the description text box I get a Runtime error on Line 163, Error: object expected. This happens when I hit any key on my keyboard.

Nibbler

Temporarily disable javascript.

Sami

when you hit a key this page going to execute "textCounter" function (javascript),your problem is javascript or mey be you change the editpics.php manualy
do as nibbler said and check for error(it will gone) but you should also check your editpics.php file for any change
‍I don't answer to PM with support question
Please post your issue to related board

Font Color Red

Quote from: Nibbler on April 09, 2006, 03:16:34 PM
Temporarily disable javascript.

How do I do this?

Isn't there a way to fix the code? There is an error in the coding somewhere that is causing this.

Font Color Red

Quote from: bmossavari on April 09, 2006, 03:28:11 PM
when you hit a key this page going to execute "textCounter" function (javascript),your problem is javascript or mey be you change the editpics.php manualy
do as nibbler said and check for error(it will gone) but you should also check your editpics.php file for any change

What do I edit in editpics.php?

Sami

1.do you have these lines on editpics.php (lines:517~520)

function textCounter(field, maxlimit) {
        if (field.value.length > maxlimit) // if too long...trim it!
        field.value = field.value.substring(0, maxlimit);
}

if no , you should add those
2.you can temporary disable javascript on that file by change line 356
<textarea name="$name" rows="5" cols="40" class="textinput" style="width: 100%;" onkeydown="textCounter(this, $max_length);" onkeyup="textCounter(this, $max_length);">$value</textarea>
to
<textarea name="$name" rows="5" cols="40" class="textinput" style="width: 100%;">$value</textarea>
‍I don't answer to PM with support question
Please post your issue to related board

Font Color Red

Quote from: bmossavari on April 10, 2006, 12:36:55 AM
1.do you have these lines on editpics.php (lines:517~520)

function textCounter(field, maxlimit) {
        if (field.value.length > maxlimit) // if too long...trim it!
        field.value = field.value.substring(0, maxlimit);
}

if no , you should add those
2.you can temporary disable javascript on that file by change line 356
<textarea name="$name" rows="5" cols="40" class="textinput" style="width: 100%;" onkeydown="textCounter(this, $max_length);" onkeyup="textCounter(this, $max_length);">$value</textarea>
to
<textarea name="$name" rows="5" cols="40" class="textinput" style="width: 100%;">$value</textarea>


The first code is already there.

The second code to disable javascript didn't work, I still got the same Runtime error.

Any other options to get around this error?

Joachim Müller

temporarily disable JavaScript in your browser

Sami

If you are using IE you can disable Javascript by :

1. Click Start, point to Settings, click Control Panel, and then double-click Internet Options.

If you are using Internet Explorer 4.x, double-click Internet in Control Panel.
2. Click the Security tab.
3. Click the Internet zone, and then click Custom Level.

If you are using Internet Explorer 4.x, click Internet Zone.
4. In the Settings box, locate the Scripting section, and then click Disable under Active Scripting.
5. Click OK.
6. Click OK.
‍I don't answer to PM with support question
Please post your issue to related board

Font Color Red

Quote from: bmossavari on April 10, 2006, 11:12:51 AM
If you are using IE you can disable Javascript by :

1. Click Start, point to Settings, click Control Panel, and then double-click Internet Options.

If you are using Internet Explorer 4.x, double-click Internet in Control Panel.
2. Click the Security tab.
3. Click the Internet zone, and then click Custom Level.

If you are using Internet Explorer 4.x, click Internet Zone.
4. In the Settings box, locate the Scripting section, and then click Disable under Active Scripting.
5. Click OK.
6. Click OK.


That sure seems like a hassle to temporarily disable javascript everytime I need to edit a description of a file. Isn't there a way to fix this error in the coding??

Nibbler

Maybe allowing us to test this on your gallery would be helpful.