andy mac
asked 9 years ago

I’ve installed Question and Answer, and most of it looks good and is appearing to work well. However, when a user clicks “Log In” or “Register” from the “Ask a Question” page, the ajax simply moves on to the opposite. EG: If a user clicks “register” because they aren’t logged in, the page transitions (within the page) so it now becomes a “log in” button. Click on the “log in” button and it transitions and becomes the “register” button. The links are correct … if you right-click and open in a new tab / window, they go to the right place. Seems some error simply isn’t being caught or handled here.

4 Answers
BigHug
answered 9 years ago

Hi Andy,
Thanks for your feedback! We want to speed up the login/register process when users submit a question by using an ajax effect to change form instead of redirecting from submit question page to another ones. We will make a static login link and register link for this section in the next version of DW Q&A to support the case you point out.
Regards

andy mac
replied 9 years ago

I understand, and the Ajax looks good, as you say. However, since it simply doesn’t work (at least on the site I’m building for a charity), is there a known reason why? Code I can edit? Or alternately, how soon is the new version coming out?

BigHug
replied 9 years ago

Please check scripts on your site, maybe your scripts print out some errors and stop javascript from working properly. Can you give me your site url for further checking?

andy mac
replied 9 years ago

http://cpu4u.org/ask-question

I didn’t see any errors being logged in the dev console. Just that you press register or login and it switches back and forth.

BigHug
answered 9 years ago

Hi @andymac, 
I checked your site and see the login link worked properly and don’t see any problems with it. When you click on “log in” or “register” link, it will change your form display into right form ( user/password for login form and email/username for register form ). Please check your site again and give me more details if you still meet problem.
Regards

andy mac
replied 9 years ago

Shoot. I see what you mean here. I think there’s two things going on:

1) It was a bit confusing as the “ask” button doesn’t change to anything like ‘register and ask’, so I and my users thought that clicking on “login” or “register” attempted to do exactly that. I might think about rewording that area.

2) For whatever reason, once a question on the site is asked, it’s not able to be looked up, so when a user registers and asks a question, it gets the 404 page. I mistakenly took that as an error in registration, when in fact, it’s an error in locating the question that was asked.

The question exists. It’s editable in the back-end and can be found by the general questions page, but for whatever reason, Q&A can’t point to it on the front end. I guess /this/ is the real problem in this instance. (And if you want to see it, feel free to register / ask or just to try and click on one of the dummy questions in the site).

The permalink, both “on” the site and in the back end point to a subfolder named “question” with the name of the question as the page link. Not sure how you’re doing the redirect, but this wordpress site (as is common) is in the subdirectory /wordpress. I assume you’ve accounted for that kind of thing, but without digging, I don’t know where / how you’re doing your own redirect.

BigHug
replied 9 years ago

Thanks for your feedback, Andy.
1. We will update this part, maybe “Login and Ask” should sound clearer to you.
2. About this, i tested on our site, that feature still works fine. When you submit a question with registration form, you will be logged in automatically using new account and redirect to new question page. Please double check and give us more details about this problem.

andy mac
replied 9 years ago

Well, I do assume that actually seeing the question works fine on most people’s sites or no one would use this software ;). I’m not sure what’s gone wrong on mine, and I’m not sure what other details I could offer.

You can submit a question, and that question is shown on the Q&A page, but when you click on it (or immediately after you submit it), it goes to a error 404 page when looking for the question. It’s the same site and has two junk questions up there for test:
http://cpu4u.org/questions
http://cpu4u.org/question/asdfasdf
http://cpu4u.org/question/aqwerga

Both permalinks have nothing behind them. I’m not sure where the question “really” is to go find it or to change the permalinks. It’s obviously being found in the database by the “questions” page since they’re linked from that page, but the links are simply wrong.

The shortlink for one of them (http://cpu4u.org/?p=106) also redirects “correctly” to /question/asdfasdf, but again, I only get a 404.

Is this somehow related to using the custom permalink setting in your settings page? If so, I could change it back to the original to test (if I remembered what the original was)

Dominic Staff
replied 9 years ago

Hi andy, I have posted a question on your site and I saw your problem. Can you help me double check DW Question Answer permission setting by going Dashboard > DWQA > Settings>> Permission tab , please allow subscriber to view the question.

andy mac
replied 9 years ago

Good guess, but I have both read and post for subscriber in all categories. Just to be sure, I unchecked it, saved, rechecked it, and saved and saw the same issue. I then “reset all to default” and saved, and it’s still the same.

BigHug
answered 9 years ago

We are using DWQA lastest version too, but we don’t meet the problem like you so can you give me a admin account for further checking. We will find out what reason make your question go to 404 page.

andy mac
replied 9 years ago

Of course! I’m sure it’s something simple I’m missing. Email me at andrew at mclauthlintech.com and let me know who you are in the email and I’ll send back some admin credentials. Thanks for taking the time on this!

BigHug
replied 9 years ago

you can submit a private answer here, just you and me can see it

BigHug
answered 9 years ago

Hi Andy,
I checked your site and solved the 404 error for you. if you meet this issue again please go lo Dashboard > Settings > Permalink then just click on “Save Change” button.

andy mac
replied 9 years ago

I’d love to know what the issue was. I tried changing the permalink twice (once to something else, and then back). Either way, thank you! It appears to be working now 🙂

Powered by DW Question & Answer Pro