Parse error causing brizy-pro not to work
Hi!
I'm at the beginning of editing a new web page; www.barrier.no
I have no programming skills except from having made a couple of websites with html and css coding in the past.
I installed brizy and brizy pro in a fresh installation of Wordpress and got the message: "The site is experiencing technical difficulties" after having edited one page with Brizy and trying to view it in a browser. A white page with this little text.
I then deactivated Brizy pro, deleted it and uploaded the brizy pro zip-file again to re-install it.
When trying to edit a page with brizy (not pro) it seems to work fine.
When activating brizy pro, and trying to "edit the page with brizy", i get the message:
Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR) in /var/www/clients/client165/web163/web/wp-content/plugins/brizy-pro/content/placeholders/post-content.php on line 27
(Below I'll add the full error message (came as a table below the above mentioned error-message)
I took a look at the file and line 27, which is:
- - - - - - - - - -Content of post-content.php SEE LINE 27 IN BOLD - - - - - - - - -
<?php
class BrizyPro_Content_Placeholders_PostContent extends BrizyPro_Content_Placeholders_SimplePostAware
{
/**
* @return string|callable
*/
protected $value;
/**
* BrizyPro_Content_Placeholders_PostContent constructor.
*
* @param $label
* @param $placeholder
* @param string $display
*/
public function __construct($label, $placeholder, $display = Brizy_Content_Placeholders_Abstract::DISPLAY_INLINE)
{
parent::__construct($label, $placeholder, $this->getTheContentCallback(), $display);
}
private function getTheContentCallback()
{
return function ($context) {
LINE 27: if (($post = Brizy_Editor_Post::get($context->getWpPost()))->uses_editor()) {
$content = $post->get_compiled_page()->get_body();
} else {
$content = $context->getWpPost()->post_content;
}
return $content;
};
}
}
- - - - - - - - - -
Here is the whole / full error-message I encountered:
| ( ! ) Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR) in /var/www/clients/client165/web163/web/wp-content/plugins/brizy-pro/content/placeholders/post-content.php on line 27 | ||||
|---|---|---|---|---|
| Call Stack | ||||
| # | Time | Memory | Function | Location |
| 1 | 0.0002 | 246296 | {main}( ) | .../index.php:0 |
| 2 | 0.0003 | 249424 | require( '/var/www/clients/client165/web163/web/wp-blog-header.php' ) | .../index.php:17 |
| 3 | 0.4465 | 47253928 | require_once( '/var/www/clients/client165/web163/web/wp-includes/template-loader.php' ) | .../wp-blog-header.php:19 |
| 4 | 0.4579 | 47261368 | apply_filters( ) | .../template-loader.php:104 |
| 5 | 0.4579 | 47261760 | WP_Hook->apply_filters( ) | .../plugin.php:206 |
| 6 | 0.4579 | 47263352 | call_user_func_array:{/var/www/clients/client165/web163/web/wp-includes/class-wp-hook.php:287} ( ) | .../class-wp-hook.php:287 |
| 7 | 0.4579 | 47264072 | Brizy_Public_Main->templateInclude( ) | .../class-wp-hook.php:287 |
| 8 | 0.4579 | 47264168 | Brizy_Public_Main->getConfigObject( ) | .../main.php:241 |
| 9 | 0.4614 | 47519256 | Brizy_Editor_Editor_Editor->config( ) | .../main.php:442 |
| 10 | 0.5099 | 48429864 | apply_filters( ) | .../editor.php:187 |
| 11 | 0.5100 | 48430256 | WP_Hook->apply_filters( ) | .../plugin.php:206 |
| 12 | 0.5101 | 48446088 | call_user_func_array:{/var/www/clients/client165/web163/web/wp-includes/class-wp-hook.php:287} ( ) | .../class-wp-hook.php:287 |
| 13 | 0.5101 | 48446720 | BrizyPro_Main->addConfigDynamicContent( ) | .../class-wp-hook.php:287 |
| 14 | 0.5295 | 48694136 | Brizy_Content_PlaceholderProvider->getGroupedPlaceholders( ) | .../main.php:395 |
| 15 | 0.5295 | 48694544 | BrizyPro_Content_Providers_Wp->getGroupedPlaceholders( ) | .../placeholder-provider.php:44 |
| 16 | 0.5295 | 48694792 | BrizyPro_Content_Providers_Wp->getTextPlaceholders( ) | .../wp.php:13 |
| 17 | 0.5349 | 48725104 | spl_autoload_call ( ) | .../wp.php:57 |
| 18 | 0.5351 | 48725536 | brizy_pro_autoload( ) | .../wp.php:57 |
-
Hi,
Thank you for going deeper into this issue. I understand it's a new installation and everything is probably up to date but please confirm that you have this issue with the latest Brizy version - Free 2.1.4 and PRO 2.1.2
0 -
Ok. I updated Brizy pro from 2.1.1 til 2.1.2 now, and then it seems to work!
Fantastic; thanks for the advice!0 -
Hi,
I'm glad to hear that. Let us know if you need anything else.
0
Please sign in to leave a comment.
Comments
3 comments