bug with pagebuilder on frontpage
if on the frontpage used pagebuilder with get params in address bar AND i use funtion “is_active_widget” – it return false
FIX:
—
inc/sidebars-emulator.php at line 64
function register_widgets( ) {
// Get the ID of the current post
$post_id = url_to_postid( add_query_arg( false, false ) );
if( empty($post_id) ) {
// Maybe this is the home page
$home_url_parts = parse_url( trailingslashit( home_url() ) );
if( add_query_arg( false, false ) === $home_url_parts[‘path’] && get_option(‘page_on_front’) != 0 ) {
$post_id = get_option( ‘page_on_front’ );
}
}
if( empty($post_id) ) return;
function register_widgets( ) {
// Get the ID of the current post
$post_id = url_to_postid( add_query_arg( false, false ) );
if( empty($post_id) ) {
// Maybe this is the home page
$current_url_parts = parse_url( add_query_arg( false, false ) );
$home_url_parts = parse_url( trailingslashit( home_url() ) );
if($current_url_parts[‘path’] === $home_url_parts[‘path’] && get_option(‘page_on_front’) != 0 ) {
$post_id = get_option( ‘page_on_front’ );
}
}
if( empty($post_id) ) return;
This is our free support forum. Replies can take several days.
Need fast email support? Get SiteOrigin Premium
Replies
8Hi Eugene
Thanks for taking the time to send this important feedback.
We’ll have this resolved in Page Builder 2.2. The relevant commit is here:
https://github.com/siteorigin/siteorigin-panels/pull/73
problem still exists
v 2.2
Thanks for the feedback.
Have you managed to resolve in your local copy? Any chance you’d been keen to submit a pull request?
https://github.com/siteorigin/siteorigin-panels
yes, we fixed this bug on local copy
I wrote a solution. see above
$current_url_parts = parse_url( add_query_arg( false, false ) ); $home_url_parts = parse_url( trailingslashit( home_url() ) ); if($current_url_parts['path'] === $home_url_parts['path'] && get_option('page_on_front') != 0 ) {Ok super, thanks for the effort. Would you mind formally submitting the pull request on GitHub so the guys can look this over and test?
(https://help.github.com/articles/using-pull-requests/)
The link just there in case. Sorry if I am telling you things you already know :)
i signed up on github and send link on this topic.
Thanks :) Once the pull request is submitted it should appear in this list:
https://github.com/siteorigin/siteorigin-panels/pulls?q=is%3Aopen+is%3Apr
Do you normally work with Git? If not, this might be a bit time consuming. Let me know either way. We appreciate your considered feedback and support.
Replies on this thread are closed.
Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.