Hi,
If you Google that error you will see that is a Symphony error. It’s not related to the plugin.
Thanks Claude,
I’m not familiar with php and twig development, I’ve been asked to add this plugin but I can’t understand where this error come from, I’ve installed some plugins and never had this problem before.
All I understand is that the variable $atts is not defined in plugins/wp-linkedin/wp-linkedin.php :285
function wp_linkedin_profile($atts='') {
$atts = wp_linkedin_shortcode_atts(array(
'fields' => LINKEDIN_FIELDS,
'lang' => LINKEDIN_PROFILELANGUAGE
// HERE
), $atts, 'li_profile');
extract($atts);
$fields = preg_replace('/\s+/', '', LINKEDIN_FIELDS_BASIC . ',' . $fields);
$profile = wp_linkedin_get_profile($fields, $lang);
if (is_wp_error($profile)) {
return wp_linkedin_error($profile);
} elseif ($profile && is_object($profile)) {
return wp_linkedin_load_template('profile',
array_merge($atts, array('profile' => $profile)));
}
}
but I’m following the instructions on the extension homepage.
that error doesn’t make sense, that variable is defined just above, in the signature of the method
Yep, it doesn’t make sense, but I’ve change something and now the error actually concerned the function at line 252+ :
function wp_linkedin_shortcode_atts($pairs, $args, $shortcode) {
$out = wp_parse_args($args, $pairs);
if ($shortcode) {
$out = apply_filters("shortcode_atts_{$shortcode}", $out, $pairs, $atts, $shortcode);
}
return $out;
}
in $out = apply_filters("shortcode_atts_{$shortcode}", $out, $pairs, $atts, $shortcode); the variable $atts wasn’t defined. So I defined it as an empty array and now the code works.
function wp_linkedin_shortcode_atts($pairs, $args, $shortcode) {
$out = wp_parse_args($args, $pairs);
// edit
$atts = array();
if ($shortcode) {
$out = apply_filters("shortcode_atts_{$shortcode}", $out, $pairs, $atts, $shortcode);
}
return $out;
}
Themosis framework, and twig, prevented me from going further.
-
This reply was modified 8 years, 9 months ago by
wollsale.
-
This reply was modified 8 years, 9 months ago by
wollsale.
I think you found a nice bug, but it’s not what you think 🙂
I will release a fix shortly