strayAncient Posted November 23, 2012 Share Posted November 23, 2012 Hello World! My first post here. I have a weird problem with "bbPress User Ignore" plugin for WordPress. I am using wampserver (clean install) for coding a quick mod needed for a website. Installed the latest version of WP, bbPress and bbPress Ignore User. In WP Dashboard, could not activate the plugin. Throws a fatal error. The exact error shown: Plugin could not be activated because it triggered a fatal error. Parse error: syntax error, unexpected 'endforeach' (T_ENDFOREACH) in C:\wamp\www\wordpress\wp-content\plugins\bbpress-ignore-user\bbpress-ignore-user.php on line 169 Have I missed turning on/off or editing a simple required option in one of the configuration files? Apache Version: 2.4.2 PHP Version: 5.4.3 MySQL Version: 5.5.24 Link to comment https://forums.phpfreaks.com/topic/271071-bbpress-ignore-user-fatal-error-while-activation-the-plugin/ Share on other sites More sharing options...
PFMaBiSmAd Posted November 23, 2012 Share Posted November 23, 2012 There's likely a syntax error on the line(s) right above that point (the WP style of programming makes it easy to break the syntax, but hard to find the problem.) Post lines 159-169 of that file. Link to comment https://forums.phpfreaks.com/topic/271071-bbpress-ignore-user-fatal-error-while-activation-the-plugin/#findComment-1394614 Share on other sites More sharing options...
strayAncient Posted November 23, 2012 Author Share Posted November 23, 2012 159-169 coming up... <tr> <td class="label">Ignored Users List</td> <td class="data"><? foreach ($ignored_users as $user_id => $user_login) : $ajax = "jQuery.post(IgnoreUser.ajaxurl,{'action':'bbp_5o1_unignore_user','data':'delete ".$user_id.";user_id ".$displayed_user_id."'},function(response){if (response){user=document.getElementById('ignored-user-".$user_id."');user.parentNode.removeChild(user);}});"; ?> <span id="ignored-user-<?php print $user_id; ?>" style="display: inline-block; line-height: 1.5em; margin: 3px; padding: 2px 5px; background: #eee;"> <span style="padding: 0 5px 0 0;"><?php print $user_login; ?></span> <a style="cursor: pointer;" title="Remove" onclick="<?php print $ajax; ?>;">✖</a> </span> <?php endforeach; ?></td> Link to comment https://forums.phpfreaks.com/topic/271071-bbpress-ignore-user-fatal-error-while-activation-the-plugin/#findComment-1394616 Share on other sites More sharing options...
PFMaBiSmAd Posted November 23, 2012 Share Posted November 23, 2012 Most likely cause is the lazy-way short opening tag <? on the line above the foreach() : statement. Link to comment https://forums.phpfreaks.com/topic/271071-bbpress-ignore-user-fatal-error-while-activation-the-plugin/#findComment-1394618 Share on other sites More sharing options...
strayAncient Posted November 23, 2012 Author Share Posted November 23, 2012 Hahahaha. Thats it! Enabled "short open tag" and voila! it lives. Damn. How the hell did I miss that. Thank you so much. Indebted. Link to comment https://forums.phpfreaks.com/topic/271071-bbpress-ignore-user-fatal-error-while-activation-the-plugin/#findComment-1394620 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.