Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http error 500 on activation #1

Open
fatherb opened this issue Dec 12, 2016 · 5 comments
Open

http error 500 on activation #1

fatherb opened this issue Dec 12, 2016 · 5 comments

Comments

@fatherb
Copy link

fatherb commented Dec 12, 2016

hi - got an http error 500 on activation of this theme.

@andrew-worsfold
Copy link
Contributor

Hi @fatherb -

Is there any other information you can share about the error? I've just tried to reproduce this and have been unable to do so.

Cheers,
Andrew.

@callard
Copy link

callard commented Jan 13, 2017

Hello,
I just had the same issue.
I had tailor (plugin) activated & then I tried to activate this theme. I had a fatal error on my php log.
This is due to the function tailor_modify_colorpicker which was already declared in the plugin).

I solved the problem by commenting the block in functions.php from line 633 to line 648

Hope it helps !

@fatherb
Copy link
Author

fatherb commented Feb 9, 2017

Thanks Callard - that worked for me too.

@qoalu
Copy link

qoalu commented Jul 11, 2017

Same issue here, thanks @callard for the fix.
@andrew-worsfold can we get info if this is a bug or a feature?

@SimonvdSteen
Copy link

SimonvdSteen commented Jul 25, 2017

Digging a little deeper in the Plugin Core, I'll find in tailor/includes/helpers/helper_color.php:166 it is not checkin for the suggested modify function but it's checkin if 'tailor_custom_colorpicker_palette' exists.

In all other scenario's including it is using the default color set, or even breaking down because tailor_modify_colorpicker() will be defined twice in this example.

So replacing 'tailor_modify_colorpicker' with 'tailor_custom_colorpicker_palette' as both function and action name will solve this issue.

However while this seems to be the best suited fix for the current version. It seems inconsistent and is likely to be changed in an upcoming version by Andrew. So I would suggest adding the 3th "Priority" parameter to the add action instead, resulting in something like the example below:

add_action( 'tailor_control_args_colorpicker', function ( $control_args ) {

	$colors = array(
		'1' => '#cccccc', // Modified
		'2' => '#ffffff', // White
		'3' => '#dd3333', // Red
		'4' => '#dd9933', // Orange
		'5' => '#eeee22', // Yellow
		'6' => '#81d742', // Green
		'7' => '#1e73be', // Blue
		'8' => '#8224e3', // Purple
	);

	$control_args['palettes'] = array();
	foreach ( $colors as $number => $default ) {
		$control_args['palettes'][] = sanitize_hex_color( get_theme_mod( "tailor_color_{$number}", $default ) );
	}

	return $control_args;
}, 11 );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants