John Wyckoff
asked 8 years ago

After posting a question and when clicking link from notification email I get "Oops! That page can’t be found." The page URL is http://www.domainname.net/?post-type=dwqa-question&p=50. How do I correct this problem?

1 Answers
DominicStaff
answered 8 years ago

Hi,
I checked your site and detect that your site just have some problem with permalink settings and. Please go to the Dashboard -> Settings -> Permalink and Click Save Buttons.
If you still face there issue, you can send me username & password of your site for further checking.
Regards

johnw
replied 8 years ago

How do I send UN & PW to you securely?

dominic Staff
replied 8 years ago

You can use the private answer: http://prntscr.com/9ltym0

john_ray
replied 8 years ago

I have the exact same issue. In my case, all new question submission require admin’s approval before they are shown to user, and hence i get 404 error on new question submission which redirects user to http://www.domainname.net/?post-type=dwqa-question&p=50. If i turn off "Review Question" flag it works perfectly.

I noticed you had provided a solution on https://www.designwall.com/question/make-question-list-page-shown-automatically-question-posted-user/ but in the latest version of plugin i don’t see wp-content/plugins/dw-question-answer/inc/action.php or wp-content/plugins/dw-question-answer/inc/actions.php

dominic Staff
replied 8 years ago

We have some changes in the latest version. Please do as the following:

To redirect users to a different page or list questions when user submit a answer, please open the wp-content/plugins/dw-question-answer/inc/Posts/Answer.php file. Find the line 408.
Replace the following code:

// wp_redirect( get_permalink( $question_id ) );
// wp_send_json_success( array( 'url' => get_permalink( $question_id ) ) );
// return true;

With new code:

wp_redirect('https://your-site.com');
wp_send_json_success( array( 'url' => get_permalink( $question_id ) ) );
return true;

To redirect users to a different page when user submit a question, please open the Question.php file in the folder path wp-content -> plugins -> dw-question-answer -> inc -> Post -> Question.phpfile. Find the line code around line 439: exit( wp_safe_redirect( get_permalink( $new_question ) ) );`

Then replace with the following code to redirect to home page:
exit( wp_safe_redirect( home_url() ) );

Notice: you can use similar to redirect user to any other page as you wish (in your case to the question listing page)

Eg: like this is my url :http://mysite/discussion-forum/
exit( wp_safe_redirect( home_url() .'discussion-forum/' ) );

About the permalink of categories, have you tried to add the permalink in the Settings of Q&A

john_ray
replied 8 years ago

Thanks Dominic, that worked like charm. I have one more question, is there way to show the user a message (on "Question List" or "Ask New Question page") saying "You question has been submitted and is awaiting moderation" once user submits a new question.

john_ray
replied 8 years ago

Adding to above question, is there a way i can have "category listing of questions" in full width. I already tried changing Template.php ‘s "return dwqa_get_template( ‘page.php’ );" to full width but no luck.

john_ray
replied 8 years ago

To answer the question about showing "Question Category Listing" in full page width, i got around it by modifying my theme’s page.php to add following
<?php if ( is_main_query() && ‘dwqa-question_category’ == get_query_var(‘taxonomy’) ):?>
<article <?php post_class(‘onecolimportant’); ?> id="post-<?php the_ID(); ?>">
<?php else : ?>
<article <?php post_class(); ?> id="post-<?php the_ID(); ?>">
<?php endif; ?>

and then added a css called onecolimportant {width:100% !important; }

Not elegant solution but gets the job done.

dominic Staff
replied 8 years ago

Please accept my apology for the delay in getting back to you.
About the first question, we have answered in the following question: https://www.designwall.com/question/showing-question-awaiting-moderation-message/

Powered by DW Question & Answer Pro