Recent Topics

1 Mar 05, 2010 22:22    

My b2evolution Version: 3.3.3

When I go to the users tab, I get the following parse error located in the actions sections (where the icons are displayed for deleting users, or changing user's info, etc.):

Parse error: syntax error, unexpected T_DNUMBER in /homepages/(Removed for security reasons)/blogs/inc/_core/ui/results/_results.class.php(996) : eval()'d code on line 1

This is a fresh install of version 3.3.3 with a fresh install of the database tables. The MySQL version is 5.0 and the PHP version is 5.0

2 Mar 05, 2010 22:42

I would upload the inc/ directory again.

3 Mar 05, 2010 23:00

Uploading the inc folder did not cure the problem. I even tried it a couple of times changing the upload file type.


			// LINE START:
			$this->display_line_start( $this->current_idx == count($this->rows)-1, $fadeout_line );

			foreach( $this->cols as $col )
			{ // For each column:

				// COL START:
				$this->display_col_start();

				// Contents to output:
				$output = $this->parse_col_content( $col['td'] );
				#pre_dump( '{'.$output.'}' );
				$out = eval( "return '$output';" );
				// fp> <input> is needed for checkboxes in the Blog User/Group permissions table > advanced
				echo ( trim(strip_tags($out,'<img><input>')) === '' ? '&nbsp;' : $out );

				// COL START:
				$this->display_col_end();
			}

			// LINE END:
			$this->display_line_end();

My guess this is not a code problem, but is caused by a variable not being set properly somewhere?

Everything other than not displaying the action icons seems to work. I can click on the user's name and bring up the user's profile.

5 Mar 11, 2010 03:30

Open the file inc/users/views/_user_list.view.php line 280
You should see similar code

$Results->cols[] = array(
	'th' => T_('Actions'),
	'td_class' => 'shrinkwrap',
	'td' => action_icon( T_('Edit this user...'), 'edit', '%regenerate_url( \'action\', \'user_ID=$user_ID$\' )%' )
			.action_icon( T_('Duplicate this user...'), 'copy', '%regenerate_url( \'action\', \'action=new_user&amp;user_ID=$user_ID$\' )%' )
			.'¤conditional( (#user_ID# != 1) && (#nb_blogs# < 1) && (#user_ID# != '.$current_User->ID.'), \''
			.action_icon( T_('Delete this user!'), 'delete', '%regenerate_url( \'action\', \'action=delete_user&amp;user_ID=$user_ID$\' )%' ).'\', \''
			.get_icon( 'delete', 'noimg' ).'\' )¤'
);

See if you get an error if you simplify the code to

$Results->cols[] = array(
	'th' => T_('Actions'),
	'td_class' => 'shrinkwrap',
	'td' => 'GGG',
);

If the error is gone try adding lines until you find the "bad" one

$Results->cols[] = array(
	'th' => T_('Actions'),
	'td_class' => 'shrinkwrap',
	'td' => action_icon( T_('Edit this user...'), 'edit', '%regenerate_url( \'action\', \'user_ID=$user_ID$\' )%' ),
);


$Results->cols[] = array(
	'th' => T_('Actions'),
	'td_class' => 'shrinkwrap',
	'td' => action_icon( T_('Edit this user...'), 'edit', '%regenerate_url( \'action\', \'user_ID=$user_ID$\' )%' )
			.action_icon( T_('Duplicate this user...'), 'copy', '%regenerate_url( \'action\', \'action=new_user&amp;user_ID=$user_ID$\' )%' ),
);

6 Mar 12, 2010 20:22

I had an apostrophe in the folder name which held the b2evolution files. Now of course in the URL it was a %27 which I thought was OK, but this was tripping up b2evolution. Not sure if this can be thought of as a bug or not, but I will report it in the bug section anyway to allow the authors know of the situation. For now, I removed the apostrophe from the folder name. As OSes and applications gain in power and complexity we are allowed more things, such as long file names with complex structures.

I tried escaping the apostrophe in the base URL but that did not seem to work. I hope perhaps that since I have tracked down what was causing the error, that some of the readers here can figure out a solution where I can return to using the apostrophe.


Form is loading...