Advertisement:

Author Topic: 8: Undefined index: cols  (Read 5926 times)

Offline searchgr

  • Sophist Member
  • *****
  • Posts: 1,247
8: Undefined index: cols
« on: May 16, 2013, 11:35:49 PM »
Can you help me with this error? It happens when i visit the 'Modifications Settings' in the Administration Center.

http://www.******.net/index.php?action=admin;area=modsettings;df92ef14=8c2ac35425d1d7737041a9db4a1018a8
8: Undefined index: cols
File: /home/*****/public_html/Themes/default/Admin.template.php
Line: 930

Offline Colin

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,867
  • Gender: Male
  • SMF Developer
    • colinschoen on GitHub
Re: 8: Undefined index: cols
« Reply #1 on: May 16, 2013, 11:45:25 PM »
Did you uninstall a mod that returned errors during the uninstall process?
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

Offline searchgr

  • Sophist Member
  • *****
  • Posts: 1,247
Re: 8: Undefined index: cols
« Reply #2 on: May 17, 2013, 05:03:25 AM »
OK, i fixed it.
Thank you

Offline Colin

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,867
  • Gender: Male
  • SMF Developer
    • colinschoen on GitHub
Re: 8: Undefined index: cols
« Reply #3 on: May 17, 2013, 10:12:40 AM »
Would you mind sharing your solution?
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

Offline searchgr

  • Sophist Member
  • *****
  • Posts: 1,247
Re: 8: Undefined index: cols
« Reply #4 on: May 18, 2013, 12:45:27 PM »
A friend of mine did the job. I don't know programming.

As i see he modified the Admin.template.php as follows:

Find:
Code: [Select]
<textarea rows="', ($config_var['size'] ? $config_var['size'] : 4), '" cols="',($config_var['cols'] ? $config_var['cols'] : 30),'" ', $javascript, $disabled, ' name="', $config_var['name'], '" id="', $config_var['name'], '">', $config_var['value'], '</textarea>';
Replace
Code: [Select]
<textarea rows="', ($config_var['size'] ? $config_var['size'] : 4), '" cols="',(isset($config_var['cols']) ? $config_var['cols'] : 30),'" ', $javascript, $disabled, ' name="', $config_var['name'], '" id="', $config_var['name'], '">', $config_var['value'], '</textarea>';
and also added (not sure if its related to this problem) the following code to alerts.php

Code: [Select]
if (isset($_GET['scheduled']) && isset($_GET['ts']) && $_GET['scheduled'] == 'task')
return;

Offline Colin

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,867
  • Gender: Male
  • SMF Developer
    • colinschoen on GitHub
Re: 8: Undefined index: cols
« Reply #5 on: May 19, 2013, 04:48:11 AM »
Much appreciated. Thanks for that.
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

Offline GL700Wing

  • Full Member
  • ***
  • Posts: 451
  • Gender: Female
Re: 8: Undefined index: cols
« Reply #6 on: June 01, 2013, 05:30:44 AM »
Thanks 'searchgr' for posting this solution - I just discovered (and fixed) the same problem in Admin.template.php (couldn't find alerts.php on my forum).

Offline searchgr

  • Sophist Member
  • *****
  • Posts: 1,247
Re: 8: Undefined index: cols
« Reply #7 on: June 01, 2013, 05:37:14 AM »
Alerts.php is a file of the 'Alerts' mod and as i see is not related to the a/m problem.

Offline Tanakino

  • Full Member
  • ***
  • Posts: 516
Re: 8: Undefined index: cols
« Reply #8 on: December 19, 2013, 03:25:08 PM »
Thanks a lot, I used the trick too .

T.

Offline Matthew K.

  • SMF Super Hero
  • *******
  • Posts: 12,430
  • Gender: Male
    • matthew.kerle on Facebook
    • @matthew_kerle on Twitter
Re: 8: Undefined index: cols
« Reply #9 on: December 19, 2013, 03:27:49 PM »
!empty(); would be a slightly better approach than isset();, but still.

Offline searchgr

  • Sophist Member
  • *****
  • Posts: 1,247
Re: 8: Undefined index: cols
« Reply #10 on: December 19, 2013, 03:33:39 PM »
Thanks, i will try it.

Offline Cola-Coca

  • SMF Hero
  • ******
  • Posts: 3,599
  • Gender: Male
Re: 8: Undefined index: cols
« Reply #11 on: April 23, 2017, 10:36:27 PM »
Thank you "searchgr", you helped me solved my problem.


Best regards.
I LOVE SMF

Offline searchgr

  • Sophist Member
  • *****
  • Posts: 1,247
Re: 8: Undefined index: cols
« Reply #12 on: April 24, 2017, 01:40:30 AM »
:) Good!