Recent Topics

1 Jun 07, 2006 19:45    

If you go here;
http://demo.b2evolution.net/HEAD.php4/blogs/admin.php?ctrl=users&login=admin&pwd=demopass

Take a look at the header columns ;)

Here is an attachment of the output source;

<tr class="group"><td class="firstcol <td colspan="7" class="firstcol">" $colspan_attrib$><a href="?ctrl=users&amp;grp_ID=1">Administrators</a></td><td class="lastcol shrinkwrap" $colspan_attrib$><a  class="action_icon" href="/HEAD.php4/blogs/admin.php?ctrl=users&amp;grp_ID=1" title="Edit this group..."><img src="http://demo.b2evolution.net/HEAD.php4/blogs/rsc/icons/edit.gif" border="0" align="top" width="16" height="15"  title="Edit this group..." class="middle" alt="Edit"/></a><a  class="action_icon" href="/HEAD.php4/blogs/admin.php?ctrl=users&amp;action=new_group&amp;grp_ID=1" title="Duplicate this group..."><img src="http://demo.b2evolution.net/HEAD.php4/blogs/rsc/icons/copy.gif" border="0" align="top" width="14" height="15"  title="Duplicate this group..." class="middle" alt="Copy"/></a></td></tr>

2 Jun 08, 2006 10:01

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.

3 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 Jun 08, 2006 10:08

Yeah that's it!
Pretty danged ugly eh?

5 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&amp;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 &amp; where appropriate.
As the $Results->title, if it contains a &, it is displayed with & instead of &amp; As seen with Groups & Users;
</a></span>Groups & Users</th></tr>
Which should be;
</a></span>Groups &amp; 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 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&amp;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&amp;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 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 Jun 14, 2006 00:14

I've just merged François fixes to this from the branch into HEAD.

9 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 &amp;
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 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?


Form is loading...