Viewing 20 posts - 1 through 20 (of 20 total)
  • Author
    Posts
  • #830314

    Hi,

    I cannot figure out where the Default Archive (archive.php) gets the parent page for the breadcrumbs string.
    In my Environment it seemst to me that it takes “any” page, it finds first. At the Moment this is an drafted
    page!

    I read some of your comments about the Default blog and so on, but no of your Support threats fits for my Problem.

    Hopefully you can tell me the (theme?) function, where the parent page is set to the Default blog page Archives.php.

    Thank you,
    Regards,
    Michael

    #831652

    Hey zwachm,
    Have you set the blog page as blog on Enfold > Theme Options > Where do you want to display blog? option.
    This sets the the breadcrumbs string

    Best regards,
    Mike

    #831769

    Hi,

    yes, I have already tried to change this setting. But this will not remove the entry “Homepage ÖBFV – Duplikat”,
    which has status “DRAFT”.

    Breadcrumbs with active Blog set to page “Aktuelle beim ÖBFV”:
    Sie befinden sich hier: Startseite/Aktuelles beim ÖBFV/Homepage ÖBFV – Duplikat/2017/Juli

    Breadcrumbs without any Setting at Enfolg-Blog page (“select page”):
    Sie befinden sich hier: Startseite/Homepage ÖBFV – Duplikat/2017/Juli

    Regards,
    Michael

    #831826

    Hi,
    Try disabling your plugins. If that resolves the issue, reactivate each one individually until you find the cause.
    Can you please include a admin login in the private content area so we can take a closer look.

    Best regards,
    Mike

    #831983

    Hi,
    ok, I have disabled all plugins and the issue keeps there.

    In the meantime I digged into the enfold theme code and found this:

    in the function avia_breadcrumbs_get_parents( $post_id = ”, $path = ” ) {
    the wordpress function get_page_by_path( $path )

    The Problem seems to be, that the function get_page_by_path does not evaluate the post_status and Returns also pages in status draft.

    So I have added this if case further down in function avia_breadcrumbs_get_parents:

    if ($page->post_status != ‘draft’)
    {
    /* Add the formatted post link to the array of parents. */
    $parents[] = ‘‘ . get_the_title( $post_id ) . ‘‘;
    }

    Do you think that this is the right solution for my Problem. It seems to get rid of pages in Status DRAFT in my breadcrumbs.

    Regards,
    Michael

    • This reply was modified 7 years, 3 months ago by zwachm.
    #834002

    Hi,

    That is a proper solution yes, but the drafts are not visible on users – so even if you fix it like that, it is only for your eyes noone else will be checking the drafts.
    Breadcrumbs so the title, and the title does include the word Draft inside, that is wy you do see it.

    Best regards,
    Basilis

    #834022

    Hi Basilis,

    thank you for your answer.

    The guest user (not logged in) CAN SEE the page within the breadcrumbs. But if he clicks on it it Fails (of Course).
    Exactly this was my Problem…

    Regards,
    Michael

    #836047

    Hi,

    That would need some changes – but as long as it is draft I think you need to enable if it is visible generally or only with link share.

    Best regards,
    Basilis

    #836056

    Hi,
    sorry, but I don’t understand your answer.
    The Problem is, that the Code generates breadcrumbs, which includes a (random?) page which is in Status DRAFT.

    There are two questions for me:
    – why such a page is selected at all in the breadcrumbs for the blog?
    – and: why a page in DRAFT Status is selected

    Hopefully you can see my issues now?

    Thank’s a lot!
    Regards,
    Michael

    #838313

    Hi,

    That happening because the Draft is visible for the logged in users, so you can see those posts, because you are either logged as admin
    or you created that post. So they are there.

    if you want to remove them, you would have to edit the function of breadcrumps to remove them from the loop.

    Best regards,
    Basilis

    #838349

    Hi Basilis,

    thank you for replay.
    Maybe you can read my comment from Aug, 3rd again:

    The guest user (not logged in) CAN SEE the page within the breadcrumbs. But if he clicks on it it Fails (of Course).
    Exactly this was my Problem

    So a not logged in user can see this (any by random?) page, which is in draft Status.

    So my two questions still remain not answered:
    – why such a page is selected at all in the breadcrumbs for the blog?
    – and: why a page in DRAFT Status is selected

    I think you still have the Login and can test it?!

    Regards,
    Michael

    #839711

    Hi,

    I drafted a page and accessed it while logged out. The breadcrumb shows the “404 Not Found” text. Could you please re-create the issue so that we can inspect it? The previous page is already published.

    Best regards,
    Ismael

    #840069

    Hi,

    you cannot see the fault, since my wokaround was active.
    I disabled my code-Change!

    Regards,
    Michael

    #840278

    Hi,

    I’m sorry but I’m getting a bit confused here. Did you remove the page “Homepage ÖBFV – Duplikat”? I can’t find it anywhere in the Pages panel. What is the “xxxx” page for?

    Best regards,
    Ismael

    #840374

    Hi,

    maybe I did remove the page, I was not Aware, that it was for your test!
    The xxxx page is a random? selected page, chosen by your enfold code to generate the breadcrumbs.

    As mentioned a few times, I don’t know why this page is selected as “path” for the breadcrumbs and why the post Status is also not evaluated to prohibit pages in the breadcrumbs in Status DRAFT.

    Hopefully I was able to clarify some bits?

    Regards,
    Michael

    #841841

    Hi,

    The “wp-admin” page has been disabled. This is the notification in the login page.

    This has been disabled

    Best regards,
    Ismael

    #843305

    Sorry, hopefully you can get me now more Information!

    Regards,
    Michael

    #843471

    Hi,

    Thank you for the update.

    We’d like to try this filter in the functions.php file but the “Update” button in the Appearance > Editor panel is disabled. Please add this code in the functions.php file.

    add_filter('avia_breadcrumbs_trail', 'avia_breadcrumbs_trail_mod', 100, 1);
    function avia_breadcrumbs_trail_mod( $trail ) {
        if( is_archive() )
        {
            unset( $trail[1] );
        }
        return $trail;
    }

    Best regards,
    Ismael

    #844078

    Hi Ismael,

    thank you very much for the Code. This solves my Problem ;-)

    Regards,
    Michael

    #844303

    Hi,

    Great! Let us know if you need anything else. :)

    Best regards,
    Ismael

Viewing 20 posts - 1 through 20 (of 20 total)
  • You must be logged in to reply to this topic.