Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: searchgr on May 16, 2013, 11:35:49 PM

Title: 8: Undefined index: cols
Post by: searchgr 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
Title: Re: 8: Undefined index: cols
Post by: Colin on May 16, 2013, 11:45:25 PM
Did you uninstall a mod that returned errors during the uninstall process?
Title: Re: 8: Undefined index: cols
Post by: searchgr on May 17, 2013, 05:03:25 AM
OK, i fixed it.
Thank you
Title: Re: 8: Undefined index: cols
Post by: Colin on May 17, 2013, 10:12:40 AM
Would you mind sharing your solution?
Title: Re: 8: Undefined index: cols
Post by: searchgr 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:
<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
<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

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

Title: Re: 8: Undefined index: cols
Post by: Colin on May 19, 2013, 04:48:11 AM
Much appreciated. Thanks for that.
Title: Re: 8: Undefined index: cols
Post by: GL700Wing 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).
Title: Re: 8: Undefined index: cols
Post by: searchgr 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.
Title: Re: 8: Undefined index: cols
Post by: Tanakino on December 19, 2013, 03:25:08 PM
Thanks a lot, I used the trick too .

T.
Title: Re: 8: Undefined index: cols
Post by: Matthew K. on December 19, 2013, 03:27:49 PM
!empty(); would be a slightly better approach than isset();, but still.
Title: Re: 8: Undefined index: cols
Post by: searchgr on December 19, 2013, 03:33:39 PM
Thanks, i will try it.
Title: Re: 8: Undefined index: cols
Post by: Cola-Coca on April 23, 2017, 10:36:27 PM
Thank you "searchgr", you helped me solved my problem.


Best regards.
Title: Re: 8: Undefined index: cols
Post by: searchgr on April 24, 2017, 01:40:30 AM
:) Good!