Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Can't edit files  (Read 6582 times)

0 Members and 1 Guest are viewing this topic.

Font Color Red

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Can't edit files
« on: April 09, 2006, 02:59:33 pm »

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.
Logged

Nibbler

  • Guest
Re: Can't edit files
« Reply #1 on: April 09, 2006, 03:16:34 pm »

Temporarily disable javascript.
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Can't edit files
« Reply #2 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
Logged
‍I don't answer to PM with support question
Please post your issue to related board

Font Color Red

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Re: Can't edit files
« Reply #3 on: April 10, 2006, 12:05:44 am »

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.
Logged

Font Color Red

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Re: Can't edit files
« Reply #4 on: April 10, 2006, 12:06:42 am »

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?
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Can't edit files
« Reply #5 on: April 10, 2006, 12:36:55 am »

1.do you have these lines on editpics.php (lines:517~520)
Code: [Select]
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
Code: [Select]
<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
Code: [Select]
<textarea name="$name" rows="5" cols="40" class="textinput" style="width: 100%;">$value</textarea>
Logged
‍I don't answer to PM with support question
Please post your issue to related board

Font Color Red

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Re: Can't edit files
« Reply #6 on: April 10, 2006, 02:04:48 am »

1.do you have these lines on editpics.php (lines:517~520)
Code: [Select]
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
Code: [Select]
<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
Code: [Select]
<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?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Can't edit files
« Reply #7 on: April 10, 2006, 10:40:34 am »

temporarily disable JavaScript in your browser
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Can't edit files
« Reply #8 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.
Logged
‍I don't answer to PM with support question
Please post your issue to related board

Font Color Red

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Re: Can't edit files
« Reply #9 on: April 12, 2006, 12:43:08 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??
Logged

Nibbler

  • Guest
Re: Can't edit files
« Reply #10 on: April 12, 2006, 12:50:36 am »

Maybe allowing us to test this on your gallery would be helpful.
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 19 queries.