This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

bug with pagebuilder on frontpage

10 years ago · Last reply by Andrew Misplon 10 years ago

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

8
  1. Andrew Misplon Staff 10 years, 5 months ago

    Hi 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

  2. eugene 10 years, 5 months ago

    problem still exists
    v 2.2

  3. Andrew Misplon Staff 10 years, 5 months ago

    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

  4. eugene 10 years, 5 months ago

    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 ) {
  5. Andrew Misplon Staff 10 years, 5 months ago

    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/)

  6. Andrew Misplon Staff 10 years, 5 months ago

    The link just there in case. Sorry if I am telling you things you already know :)

  7. eugene 10 years, 5 months ago

    i signed up on github and send link on this topic.

  8. Andrew Misplon Staff 10 years, 5 months ago

    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.

Have a different question or issue?

Start New Thread