Page 1 of 3

[SOLVED] - Blank contact success page

Posted: Sat Oct 28, 2017 4:19 am
by eBsimplicity
The success message after submitting the contact form is currently blank. ???

Re: Blank contact success page

Posted: Sat Oct 28, 2017 4:43 am
by straightlight
- OC version you're using?
- Tried on the default theme?
- What indicates the error logs based on the success page?

Re: Blank contact success page

Posted: Sat Oct 28, 2017 8:40 am
by eBsimplicity
It's the latest version. The message is successfully delivered, but there is no success message. It looks like a bug, as I can see it is missing on other demos as well, and on all the fresh installs ive tried. The error log does not say anything

Re: Blank contact success page

Posted: Sat Oct 28, 2017 8:50 am
by straightlight
It's not a bug but rather a missing success text since the success page has been loaded upon success and the email message has been sent. The same type of basic functionality as the product review. There is also no success message, according to the codes.

Re: Blank contact success page

Posted: Sat Oct 28, 2017 6:21 pm
by eBsimplicity
So this will be fixed in the next OC version I guess?

Re: Blank contact success page

Posted: Sat Oct 28, 2017 9:37 pm
by straightlight
Something is meant to be fixed when something has been broken in the first place. This topic does not represent a broken activity but simply a misinformed message to the users. However, your topic could be useful in the Request Features or in the Concepts section of the forum.

Re: Blank contact success page

Posted: Sat Oct 28, 2017 9:44 pm
by eBsimplicity
I dont understand how you can say theres nothing to fix? It used to be a success page, but since the release of 3.0.2 it has disappeared. Is it intentional to remove it? The success message is still in the language files.

Re: Blank contact success page

Posted: Sat Oct 28, 2017 9:51 pm
by straightlight
There is nothing to fix because it is not an action that prevents anyone on using the feature itself. Just a misinformation. However, you are correct regarding the language file of the contact page, the success message is still defined in the array.

Follow this post: viewtopic.php?f=201&t=199112#p701724

This should resolved the misinformation.

Re: Blank contact success page

Posted: Sat Oct 28, 2017 11:47 pm
by eBsimplicity
Thank you a lot! No matter the definition I hope this will be included in the next OC version. :)

Re: Blank contact success page

Posted: Fri Nov 03, 2017 5:52 pm
by darepec
Hello. I have similar issues and that fix didn't help me.

The standard contact form is functioning, I receive the emails, but after submitting the form it does not display the sent successful notification and it shows default page (with URL .../index.php?route=information/contact/success)

Does anyone have any idea what is causing this and how to fix that?
I have OC 3, default theme.

Re: Blank contact success page

Posted: Fri Nov 03, 2017 9:01 pm
by straightlight
Clear all caches from the admin as well as from the browser. If one user above indicates that this fix does take effect after the suggested changes, it is not because the provided fix is not taking effect.

Re: Blank contact success page

Posted: Sat Nov 04, 2017 2:55 am
by darepec
I did, but unfortunately it's still not working.
When I've added your suggestion into the contact.twig, it shows success message above contact form even I submitted it. After submitting it still shows default page.

Re: Blank contact success page

Posted: Sat Nov 04, 2017 3:57 am
by straightlight
Then it may be the reason why the success message could not be shown since v3.x releases. The language definition keys to show the message is detected automatically and can be added into the TWIG file. Although, it cannot seem to be undone once redirected. This may also explain one of the issue I reported some time ago about the success message loop in the admin extensions page ...

Let`s try something ... in the catalog/controller/information/contact.php file,

find:

Code: Select all

$data['store'] = $this->config->get('config_name');
add above:

Code: Select all

$data['text_success'] = false;
Clear all caches and see if that resolves the issue.

Re: Blank contact success page

Posted: Sat Nov 04, 2017 3:33 pm
by darepec
I did. Now there is no success message at all and it still shows default page.

Re: Blank contact success page

Posted: Sat Nov 04, 2017 10:38 pm
by straightlight
Revert all the changes from this topic. Then, in catalog/controller/information/contact.php file,

find:

Code: Select all

$this->response->redirect($this->url->link('information/contact/success'));
add above:

Code: Select all

$this->session->data['success'] = true;
Then, find:

Code: Select all

$data['continue'] = $this->url->link('common/home');
add below:

Code: Select all

if (!empty($this->session->data['success'])) {
			$data['text_success'] = $this->language->get('text_success');
			
			unset ($this->session->data['success']);
		}
In catalog/view/theme/<your_theme>/template/common/success.twig file,

find:

Code: Select all

</ul>
add below:

Code: Select all

{% if text_success %}
  <div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> {{ text_success }}</div>
  {% endif %}
  
This should resolved the problem.

Re: Blank contact success page

Posted: Mon Nov 06, 2017 2:39 am
by Cabsie
I'm just jumping in on this topic too, I installed V3 this week, having had 1.5 for a few years, and found the same error "no success message to the user".
I have just tried your latest suggestion straightlight, (to add the code to the contact.php and success.twig files), but it still doesn't show the success message to me. I cleared the cache before a retry too.

Re: Blank contact success page

Posted: Mon Nov 06, 2017 4:08 am
by straightlight
I have updated the success.twig step above, replace it with the new block code and see if it works.

Re: Blank contact success page

Posted: Mon Nov 06, 2017 4:29 am
by Cabsie
Perfect, thank you sir. Worked a treat.
Message displaying correctly now.
Amazing support, thanks again.

Re: Blank contact success page

Posted: Mon Nov 06, 2017 4:30 am
by straightlight
Outstanding. Posts updated for clarified directions.

Re: Blank contact success page

Posted: Mon Nov 06, 2017 5:23 am
by darepec
The best! It works now. Thanks for support.