1 balupton Jun 07, 2006 19:45
3 balupton Jun 08, 2006 10:04
EdB wrote:
It wants me to know the login name and password. Dunno what they might be! Found some uglies in CVS myself, but my copy of it.
Forgot to include the 'login=admin&pwd=demopass' part in the url, try it now ;)
4 edb Jun 08, 2006 10:08
Yeah that's it!
Pretty danged ugly eh?
5 balupton Jun 09, 2006 18:17
The problem is here [ File: \blogs\inc\VIEW\users\_users_list.php - Line: 99 ];
$Results->grp_cols[] = array(
'td_class' =>
'<td colspan="'.($current_User->check_perm( 'users', 'edit', false ) ? 7 : 6)
.'" class="firstcol'.($current_User->check_perm( 'users', 'edit', false ) ? '' : ' lastcol' ).'">',
'td' =>
'<a href="?ctrl=users&grp_ID=$grp_ID$">$grp_name$</a>'
.'¤conditional( (#grp_ID# == '.$Settings->get('newusers_grp_ID').'), \' <span class="notes">('.T_('default group for new users').')</span>\' )¤',
);
You are using 'td_class' where a class name should be, not the actual TD table.
And also [ File: \blogs\inc\_misc\_results.class.php ], has a problem with displaying html entities, like & should become & where appropriate.
As the $Results->title, if it contains a &, it is displayed with & instead of & As seen with Groups & Users;
</a></span>Groups & Users</th></tr>
Which should be;
</a></span>Groups & Users</th></tr>
Anyway, it would be a easy fix for fplanque, as he was the one that did this huge merge. But if i find some time i can look into it.
6 balupton Jun 09, 2006 19:36
Heres the fix;
Replace [ File: \blogs\inc\VIEW\users\_users_list.php - Line: 99 ];
$Results->grp_cols[] = array(
'td_class' =>
'<td colspan="'.($current_User->check_perm( 'users', 'edit', false ) ? 7 : 6)
.'" class="firstcol'.($current_User->check_perm( 'users', 'edit', false ) ? '' : ' lastcol' ).'">',
'td' =>
'<a href="?ctrl=users&grp_ID=$grp_ID$">$grp_name$</a>'
.'¤conditional( (#grp_ID# == '.$Settings->get('newusers_grp_ID').'), \' <span class="notes">('.T_('default group for new users').')</span>\' )¤',
);
With;
$Results->grp_cols[] = array(
'td_colpsan' =>
($current_User->check_perm( 'users', 'edit', false ) ? 7 : 6),
'td_class' =>
'firstcol'.($current_User->check_perm( 'users', 'edit', false ) ? '' : ' lastcol' ),
'td' =>
'<a href="?ctrl=users&grp_ID=$grp_ID$">$grp_name$</a>'
.'¤conditional( (#grp_ID# == '.$Settings->get('newusers_grp_ID').'), \' <span class="notes">('.T_('default group for new users').')</span>\' )¤',
);
7 balupton Jun 09, 2006 19:38
And heres some more fixes:
[ Files: \blogs\skins_adm\_adminUI_general.class.php , \blogs\inc\VIEW\users\_users_list.php , \blogs\inc\_misc\_results.class.php ]
Find 'colpsan' replace with 'colspan'
[ File - \blogs\skins_adm\_adminUI_general.class.php ]
Following fixe incorrect <tr> and </tr> tags being placed within the header inapropriatly. And a empty <tfoot> being displayed.
Replace [ Line - 856 ]
case 'Results':
// Results list:
return array(
'before' => '<div class="results">',
'header_start' => '<div class="results_nav">',
'header_text' => '<strong>Pages</strong>: $prev$ $first$ $list_prev$ $list$ $list_next$ $last$ $next$',
'header_text_single' => '',
'header_end' => '</div>',
'list_start' => '<table class="grouped" cellspacing="0">'."\n\n",
'head_start' => "<thead><tr>\n",
'head_title' => '<th colspan="$nb_cols$"><span style="float:right">$global_icons$</span>$title$</th></tr>'
."\n\n<tr>\n",
'filters_start' => '<tr class="filters"><td colspan="$nb_cols$">',
'filters_end' => '</td></tr>',
'line_start_head' => '<tr>', // TODO: fusionner avec colhead_start_first; mettre à jour admin_UI_general; utiliser colspan="$headspan$"
'colhead_start' => '<th>',
'colhead_start_first' => '<th class="firstcol">',
'colhead_start_last' => '<th class="lastcol">',
'colhead_end' => "</th>\n",
'sort_asc_off' => '<img src="../admin/img/grey_arrow_up.gif" alt="A" title="'.T_('Ascending order')
.'" height="12" width="11" />',
'sort_asc_on' => '<img src="../admin/img/black_arrow_up.gif" alt="A" title="'.T_('Ascending order')
.'" height="12" width="11" />',
'sort_desc_off' => '<img src="../admin/img/grey_arrow_down.gif" alt="D" title="'.T_('Descending order')
.'" height="12" width="11" />',
'sort_desc_on' => '<img src="../admin/img/black_arrow_down.gif" alt="D" title="'.T_('Descending order')
.'" height="12" width="11" />',
'basic_sort_off' => '',
'basic_sort_asc' => get_icon( 'ascending' ),
'basic_sort_desc' => get_icon( 'descending' ),
'head_end' => "</tr></thead>\n\n",
'tfoot_start' => "<tfoot>\n",
'tfoot_end' => "</tfoot>\n\n",
With
case 'Results':
// Results list:
return array(
'before' => '<div class="results">',
'header_start' => '<div class="results_nav">',
'header_text' => '<strong>Pages</strong>: $prev$ $first$ $list_prev$ $list$ $list_next$ $last$ $next$',
'header_text_single' => '',
'header_end' => '</div>',
'list_start' => '<table class="grouped" cellspacing="0">'."\n\n",
'head_start' => "<thead>\n",
'head_title' => '<tr><th colspan="$nb_cols$"><span style="float:right">$global_icons$</span>$title$</th></tr>',
'filters_start' => '<tr class="filters"><td colspan="$nb_cols$">',
'filters_end' => '</td></tr>',
'line_start_head' => '<tr>', // TODO: fusionner avec colhead_start_first; mettre à jour admin_UI_general; utiliser colspan="$headspan$"
'colhead_start' => '<th>',
'colhead_start_first' => '<th class="firstcol">',
'colhead_start_last' => '<th class="lastcol">',
'colhead_end' => "</th>\n",
'sort_asc_off' => '<img src="../admin/img/grey_arrow_up.gif" alt="A" title="'.T_('Ascending order')
.'" height="12" width="11" />',
'sort_asc_on' => '<img src="../admin/img/black_arrow_up.gif" alt="A" title="'.T_('Ascending order')
.'" height="12" width="11" />',
'sort_desc_off' => '<img src="../admin/img/grey_arrow_down.gif" alt="D" title="'.T_('Descending order')
.'" height="12" width="11" />',
'sort_desc_on' => '<img src="../admin/img/black_arrow_down.gif" alt="D" title="'.T_('Descending order')
.'" height="12" width="11" />',
'basic_sort_off' => '',
'basic_sort_asc' => get_icon( 'ascending' ),
'basic_sort_desc' => get_icon( 'descending' ),
'head_end' => "</thead>\n\n",
'tfoot_start' => "\n",
'tfoot_end' => "\n",
[ File: \blogs\inc\_misc\_results.class.php ]
The following fix, fixes '$colspan_attrib$' being displayed when there is no 'td_colspan' value.
Replace [ Line: 1107 ]
if( isset( $grp_col['td_colspan'] ) )
{
$colspan = $grp_col['td_colspan'];
if( $colspan < 0 )
{ // We want to substract columns from the total count
$colspan = $this->nb_cols + $colspan;
}
$output = str_replace( '$colspan_attrib$', 'colspan="'.$colspan.'"', $output );
}
With
if( isset( $grp_col['td_colspan'] ) )
{
$colspan = $grp_col['td_colspan'];
if( $colspan < 0 )
{ // We want to substract columns from the total count
$colspan = $this->nb_cols + $colspan;
}
$output = str_replace( '$colspan_attrib$', 'colspan="'.$colspan.'"', $output );
} else
$output = str_replace( '$colspan_attrib$', '', $output );
Thats all the fixes to make the User Management page Error and Warning Free :D - Someone better buy me a jug for this work ;)
8 blueyed Jun 14, 2006 00:14
I've just merged François fixes to this from the branch into HEAD.
9 balupton Jun 14, 2006 00:47
blueyed wrote:
I've just merged François fixes to this from the branch into HEAD.
The fixes in my previous post do not seem to be applied, as the page still returns the following warnings:
line 80 column 609 - Warning: unescaped & which should be written as &
line 83 column 1 - Warning: missing <td>
line 93 column 1 - Warning: discarding unexpected </tr>
line 99 column 119 - Warning: <td> attribute "$colspan_attrib$" lacks value
line 110 column 173 - Warning: <td> attribute "$colspan_attrib$" lacks value
line 121 column 113 - Warning: <td> attribute "$colspan_attrib$" lacks value
line 121 column 1214 - Warning: <td> attribute "$colspan_attrib$" lacks value
line 95 column 1 - Warning: trimming empty <tfoot>
I do not have francois's email so could you let him know?
10 blueyed Jun 14, 2006 00:53
Do you have the latest CVS? If there's no "Scheduler" entry in the top menu, you do not have it.
On which page do the errors appear? The "Users" page?
11 balupton Jun 14, 2006 00:57
I copied those errors directly from the demo's cvs (the link mentioned in the first post);
http://demo.b2evolution.net/HEAD.php4/blogs/admin.php?ctrl=users&login=admin&pwd=demopass
I haven't downloaded the cvs yet, and i don't plan to until another week. (when exams are over).
It wants me to know the login name and password. Dunno what they might be! Found some uglies in CVS myself, but my copy of it.