clean install / questions edit page still not found

hi there,

so i got my wpmudev subscription after my trial expired.

and i finally convinced the client to move the project site out of the clunky multisite.
and its so worth it.

so many weird issues are gone now. the site is twice as fast and buddypress does not want to eat my soul anymore. yet one issue still remains.

the page to edit questions and answers still does not work and sends me back to the index.

http://call.ccetc.de/kursprogramm/oktober/?kursinhalt=hannes-test-bitte-nicht-loeschen
(select question from the 2nd yellow area)
edit link looks like this:
http://call.ccetc.de/questions/edit/8877/

single-question.php
(99% default template - only commented out voting and changed h1 to h2)
action links for question dont show. both with my theme and twentysixteen
http://call.ccetc.de/questions/vero-eos-et-accusam-et-justo-duo-dolores-et-ea-rebum-2/

its a fresh wp install

i already opened support access.

could you please have a look?
thanks

ooooh
now i see how nice this form is with a matching account + wpmu dashboard + site installation.

  • Rupok

    Hi Hannes,

    the page to edit questions and answers still does not work and sends me back to the index.

    I tried to regenerate this on my test site but I could not. The edit pages shows me editing options perfectly without any issue. Please check the attached screenshot for reference.

    So I think this is your site specific issue.

    I tried flushing your permalink setup, but that didn't help.

    You said "action links for question dont show. both with my theme and twentysixteen", this is really weird because one question page is showing action links and other is not.

    Is it possible that we change your current theme to TwentySixteen and see the issue in action? That will make sure your currently active theme is not causing this.

    Just to make sure no other plugin is causing this, can you please do a plugin conflict test? To know more about plugin conflict test, you can check this guide: http://premium.wpmudev.org/manuals/using-wpmu-dev/getting-support/

    Please let us know how it goes. If plugin conflict test doesn't help you find out the reason, please let us know. We will be glad to investigate further.

    I'm looking forward to hear from you and resolve this issue as soon as possible.

    Have a nice day. Cheers!
    Rupok

  • Hannes

    hey Rupok,

    thanks for looking into it.

    i disabled all plugins i could - the issue remained
    only wpmu dashboard and q&a active

    yes until oct.17 you could switch - for a short time - to the default theme
    i tried and there are no action links at all on single-questions

    i create new questions on save via the acf save hook
    set a custom post type as parent
    (functions.php line 642 ... )

    i just made a question from the dashboard
    to see if that might be the cause - the issue remained

    "test" is generated from the wp-dashboard
    the second is linked to "Die Anfangsidee"
    [image pos="1"]
    from that side everything seems alright

    i need to finish the site within the next 5 days
    this is one of the last technical issues

    a smaller one: i have the german language file active and most of it ist translated
    but "votes" and "answers" in the archive view - yes i still need to style that
    are not affected (i had a look inside the po file)
    not a big issue though

    i used http://www.redirect-checker.org/

    >>> http://call.ccetc.de/questions/edit/8919/

    > --------------------------------------------
    > 200 OK
    > --------------------------------------------

    Status: 200 OK
    Code: 200
    Date: Thu, 13 Oct 2016 01:14:51 GMT
    Server: Apache
    Vary: Cookie,Accept-Encoding
    Expires: Wed, 11 Jan 1984 05:00:00 GMT
    Cache-Control: no-cache, must-revalidate, max-age=0
    Link: <http://call.ccetc.de/wp-json/>; rel="https://api.w.org/"
    Connection: close
    Content-Type: text/html; charset=UTF-8

    thank you

  • Kasia Swiderska

    Hello Hannes,

    Please comment those line

    if ( ! is_object( $count_posts ) || ! isset( $count_posts->publish ) || ! $count_posts->publish ) {
    				$wp_query->is_robots = true;
    			}

    in 417-419 at file core/core.php in Q&A plugin directory

    //if ( ! is_object( $count_posts ) || ! isset( $count_posts->publish ) || ! $count_posts->publish ) {
    //				$wp_query->is_robots = true;
    //			}

    Let me know if this will fix issue on your site.

    kind regards,
    Kasia

  • Kasia Swiderska

    Hello Hannes,

    (but if that helped it would have confused me anyway - im certain there are posts)

    When I click edit post I see this - and its not redirecting me anywhere

    that issue was reported before - that instead of content there is User-agent: * rules. On other member sites commenting those line fixed that issue. That is why I wrote about that.

    But now I'm thinking that maybe we see different things on our sides? is it possible you could make a screencast what is happening on your side?

    kind regards,
    Kasia

  • Hannes

    i just downloaded the q&a plugin again
    and uploaded fresh files.

    only changes i made are:
    "core.php" > the_answer_list() put get_the_qa_author_box() before the content
    "core.php" > function parse_query() $wp_query->set( 'order', DESC' );

    nothing changed
    the issue remains

    clicking the "edit" button shows the User-agent message
    (will comment out the mentioned code lines again)

  • Hannes

    i made another clean install and a new theme and step by step started with the very basic elements

    turns out the edit pages behave a bit different then the rest:
    instead of using a page template they use index.php

    (i do not use index.php but instead have a page-home template for my homepage)

    the index had
    get_template_part( content', get_post_format() );
    but content is located in template-parts
    so i changed it to
    get_template_part( 'template-parts/content', get_post_format() );
    now that this works

    i copied "edit-question" and "edit-answer" from the default-templates folder to refine them.
    but they still use the templates inside the plugin folder
    (i also tried it with the a "qa/default-templates" structure inside my them (similar to buddypress))

    how can i target my copied and modified templates
    also i would like to use a generic page template instead of index.php

    later i would want to use AJAX to load the edit forms and prevent the redirect
    but im glad the edit pages dont break anymore.

    could you clarify what the thesis templates are?
    i noticed they are basically a function - could i use these to display the forms via ajax?

    thank you

  • Nithin

    Hi Hannes,

    Hope you are doing good today.

    i copied "edit-question" and "edit-answer" from the default-templates folder to refine them.
    but they still use the templates inside the plugin folder
    (i also tried it with the a "qa/default-templates" structure inside my them (similar to buddypress))

    Since edit-question.php, and edit-answer.php are not part of the WordPress template hierarchy, copying these files to the theme folder won't work out of the box. Please try re-naming these templates to page-edit-question.php, and page-edit-answer.php , you'll have to uncomment the lines commented in these templates in order to get this work. Ie un-comment get_header, get_footer, and get_sidebar functions in it.

    Other than these templates, other templates are part of the WordPress template hierarchy, and it should work out of the box when you copy the templates from /default-templates folder, to your theme folder.

    could you clarify what the thesis templates are?
    i noticed they are basically a function - could i use these to display the forms via ajax?

    The thesis templates are for providing theme compatibility for Thesis theme. I'm afraid, there isn't any out of the box settings available in the plugin to make the forms work via ajax. If you are considering custom development, would recommend you to check our Jobs & Pros section to get this done.

    I hope this helps. Please let us know if you still need any further assistance. Have a nice day.

    Kind Regards,
    Ntihin