Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Email confirm links incorrect

Hi,
I am at a loss as to how to fix 2 problems I have on a new install.
I am Embedding my forum in a Wordpress Page.
So I have the forum embedded at http://websitename/page/
My forum is located at http://websitename/forum/
I have it set so that users can only view the page in the embedded page.

My problem is that the links in the Confirmation Emails go to http://websitename/forum/index.php?p=/entry/emailconfirm/5/AEGGAI6Q
(please note I used the last 2 parts from an actual email.)
But when users click the link it redirects them to http://websitename/page/index.php?p=/entry/emailconfirm/5/AEGGAI6Q
As a result they get an Error message saying that their email can not be confirmed !!
Additionally it says: You can access the site at http://websitename/forum/index.php?p=/. and I want it to say http://websitename/page/index.php?p=/.

How can I fix this problem?

Also... I modified the TOS in en.php however the TOS I have are longer than the popup window. How can I get it to scroll so they can see the whole TOS ??

Thanks in advance.

«1

Comments

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    Please post the contents of the htaccess file and tell us if you have this in the config.php

    $Configuration['Garden']['RewriteUrls'] = TRUE;

    hgtonight
  • edited April 2016

    First, I do NOT see the above RewriteUrls in the config.php file.

    Here is the htaccess from the Vanilla directory:

    # Original
    # If you modify this file then change the above line to: # Modified
    <IfModule mod_rewrite.c>
       RewriteEngine On
       # Certain hosts may require the following line.
       # If vanilla is in a subfolder then you need to specify it after the /.
       # (ex. You put Vanilla in /forum so change the next line to: RewriteBase /forum)
       # RewriteBase /
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteRule ^(.*)$ index.php\?p=$1 [QSA,L]
    </IfModule>
    
    And this is the one from the Wordpress (root directory):
    ectoryIndex index.php
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress
    
    # Wordfence WAF
    <IfModule mod_php5.c>
        php_value auto_prepend_file '/services/webpages/s/t/_websitename_.com/public/wordfence-waf.php'
    </IfModule>
    <Files ".user.ini">
    <IfModule mod_authz_core.c>
        Require all denied
    </IfModule>
    <IfModule !mod_authz_core.c>
        Order deny,allow
        Deny from all
    </IfModule>
    </Files>
    
    # END Wordfence WAF
    
  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    Please add that line in the config.php

    and fix you htaccess file replace this

    # RewriteBase /

    With this

    RewriteBase /

    The hash disables the rule. Then you can go from there to the next problem.

  • I have amended the htaccess file by removing the hash
    I attempted to amend the config.php file with the code exactly as written and it broke the forum !! Everything comes up as a Page Not Found within the Wordpress main site. So that doesn't solve the problem.
    I left the htaccess amended and tried a registration email and it still does not respond properly when a user confirms their email. The error I get is....
    Confirm Email
    We couldn't confirm your email. Check the link in the email we sent you or try sending another confirmation email.
    To send another confirmation email click here.

    I have had to leave the "Confirm email" option unchecked at this time which is a concern. I hope you have another solution.

    And anything on the TOS scrolling ability??

  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited April 2016

    Please remember that when editing any file you must delete the .ini files in the cache of the forum. There is nothing wrong , your forum did not break. You simply did not know that the .ini files need to be flushed .

    Both the htaccess file and the config line need to be working at the same time.

    if your forum is in the root just use / (make sure you have nothing else installed that uses an htaccess file in the root)

    if your forum is in a subdirectory called forum or anything else /forum or /anythingelse

    These things must work all in concert. Please do not use the embedded forum to edit or test these things. It only wastes your time. Get the standalone working first and worry about embedding later.

    Also the embedded forum is not the real forum it is an iframe of the forum and is subject to more problems that have to do with wordpress plugins and js issues.

    And anything on the TOS scrolling ability??

    I don't understand what you mean, if it is that the page gets cut off or something visual, then it has to do with your theme and also with the wordpress theme. If it is something else that may be due to some javascript error you should be able to inspect the error by using a web inspector extension to your browser. We can't guess so it is best and fastest to give the real url to your forum or wait until someone has time to help.

    https://vanillaforums.org/discussion/25111/about-error-404-not-found

  • I was clearing the ini files every time I made a change !! And I tried making both changes, then undoing them, then only the htaccess, then adding the config file, then reverting the htaccess to original, then reverting the config to original, then changing just the htaccess. The only times the forum worked is with no changes and with only the htaccess changed.

    My file structure is wordpress is in root, the Vanilla forum is in a directory named /forum
    Perhaps my just copying the changes as you suggested them was incorrect. Should they be written different now that you know the directory structure I am using??

  • edited April 2016

    And the TOS scrolling, I amended the text in the main file whee it is located. The TOS link on the registration page is a popup and the popup has no scrolling ability.
    I am using the provided Embedded theme and the provided Mobile theme.
    The TOS gets cut off by the Wordpress Footer.

  • edited April 2016

    As a followup, I had specified in my original post that the Forum was installed in /forum, so I took your suggestion literally and did not included the forum in the htaccess file. I have since entered it correctly and added the change back into the config.php file and it does not impact the forum negatively.
    However I just did a new registration. When I clicked the confirm link in the email it first takes me to an un-embedded version where it states my email IS confirmed. (I have the Forum set to only be visible within the embed page) A few seconds later it takes me to the embedded view within the page and then the error notice comes up. It does seem that the email is confirmed but when it is redirecting somehow it causes the Error Notice. If I click the "Resend Email Confirm" link it then says that i don't need to confirm.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited April 2016

    Ok Glad that was sorted out and pretty urls are now working.

    As I stated , embedding your forum will have glitches it is not recommended to do so . It is best to make your forum look like your main site and then put a link on the main site to the forum and in the forum to the main site.

    The issue with the TOS , does that happen on the real forum ? If no, then the issue is when're the forum is embedded. The space for it is not large enough. I am guessing, I could only know for sure if I saw it and inspect it.

    When I clicked the confirm link in the email it first takes me to an un-embedded version where it states my email IS confirmed

    There are ways of tricking the embed to display the page inside the iframe instead of opening another window by making the target="_parent" in the link structure for the TOS or anything else that may open in a new window instead or the iframe you have embedded in a wordpress page.

    The error could be traced if you look at your cgi error logs where you host your files. If it is a javascript error then it could be seen using a web inspector .

  • @vrijvlinder said:

    As I stated , embedding your forum will have glitches it is not recommended to do so . It is best to make your forum look like your main site and then put a link on the main site to the forum and in the forum to the main site.

    I have worked with other Forum software since 2003 and most were used within a CMS website. When I started developing this new site, I was aware of Vanilla Forums software and had it on my list of ones to consider. It was the glowing remarks in http:/blog.vanillaforums.com in numerous articles plus finding out about the Wordpress plugin that seemed to say how easy it would all be. So your comment very much contradicts what I read! I do have to say that for the most part it was relatively easy to embed. The htaccess info should be included within the Wordpress Plugin Installation information and in the Wordpress Plugin Settings page. Would have been a big help and eliminated some of my frustration.

    So it appears that you are not going to assist further on this. It would seem to me that within the Confirm Email process there should be some way to accommodate the error from coming up in an Embedded environment. This solution would be within the Base code of Vanilla. Which is why I came here for help.

    My comments also apply to the issue I am having with the TOS but I will look at other ways to display a TOS so it doesn't get cut off. Again, the problem is in the Vanilla Forum code, in the Embedded Template you provide in your software. Again, why I came here for help.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    I am a user just like you and have set up several forums for people over the last almost 4 years. I am not employed by the developers of this software. I am a volunteer that has acquired some experience in using the software and creating themes and add ons I donated to the community. I have not encountered any of the issues you describe. However willing to help you solve them because other people have had some of these issues and was able to help them.

    I explained that I need a link to see your forum and experience the issue you describe. I also pointed out the possible reasons this may be happening. It normally has to do with css. The theme must have a line in the custom.css file which gives the popup an inadequate height. But I am guessing. Without seeing the popup and inspecting the code, I am guessing. I am sorry you think that means I am unwilling to help. How can I help when I can't see the code ??

    This free open source software is just that. It does not come polished up. The default themes are not polished up , the mobile theme is not polished up. Why? Because they want you to make it like you want it. That is what is great about this software, it is easy to create with it. There are tons of themes and plugins to help.

    There is a PrivacyNotice Plugin to make your own Privacy infer page, you can also create your own TSO and link it then add this config with the link to the TSO.

    $Configuration['Garden']['TermsOfService'] = 'termsofservice'; // The url to the terms of service.

    You can also make it so it does not open in a pop up by using some javascript code in your master template .

    Vanilla is a great standalone Forum software, it can be embedded but it takes tweaking to get it to work good. Many things have to be considered. That is my opinion and experience, others might disagree.

    Please try another theme and see if the issue is repeated.

    hgtonightDavidShine
  • Thank you for your response. I did my best not to specifically point fingers at you as I thought you may be a volunteer and not a "company rep". However your comment about Vanilla not being recommended for embedding directly contradicted what I had read. So I felt the need to address this and my frustration came out. I apologize for that.

    I am quite happy to provide a link to the site but was unwilling to do so publicly as it is NSFW in some minds. You did not directly ask for the link until your last post. In setting up the main part of the site I was having issues with Wordpress plugins and freely allowed Plugin authors Admin access to the site for debugging during it's development.

    In setting up the site where the Forum is embedded I had many issues to deal with and did not have time to spend enormous amounts of hours going into the code to find "Hack" solutions. And, indeed, hacking the code has always presented a huge problem when it comes time to update the Core. I have documented the changes thus far and saved a file into one of the directories. After all I could get hit by a bus tomorrow and the site owner will need someone else to deal with these issues in the future.

    I understand that the Open Source may not be perfect but it is still based off the code that is "sold" and certainly if I was to consider a buying option and these issues were present I would want my money back. I stayed with the default themes that are part of the open source code specifically so I don't have to rewrite them all entirely. And from what i was seeing, the issues are not within the Theme templates but rather in the base code.

    I would welcome your suggestion and value your considerable experience. Please check out the site and register accounts as you need to.

    hgtonight
  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited April 2016

    I understand that the Open Source may not be perfect but it is still based off the code that is "sold" and certainly if I was to consider a buying option and these issues were present I would want my money back.

    Their hosted plan has no issues or problems and you never need to worry about anything they do it all for you. Maybe you could consider that instead.

    I am quite happy to provide a link to the site but was unwilling to do so publicly as it is NSFW in some minds.

    I never look at or read the content, I look at the code, so it does not matter what your site is about.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    Ok to fix the TOS popup please add this code to the custom.css file of the theme you have enabled.

    div.Popup .Body{
    background: #fff;
    padding: 10px;
    float: left;
    max-height: 400px;
    overflow: auto;
    }
    
    DavidShine
  • Thanks for this... it works in both the Default EmbedFriendly and the Default Mobile themes!!
    You're AWESOME !!!! :)

    Now as for the Email Confirm errors,, I am still getting a non-embedded plain page that says it is confirmed when the link in the email is clicked and then when the page moves into the Embedded view the errors come up. So I looked at the code in /application/dashboard/views/entry/emailconfirm.php and find this:

    echo $this->Form->open();
    echo $this->Form->errors();
    
    echo '<div class="P NoPanel">';
    
    if ($this->data('EmailConfirmed')) {
        echo t('Your email has been successfully confirmed.');
    } else {
        echo sprintf(t('To send another confirmation email click <a href="%s">here</a>.'), url('/entry/emailconfirmrequest'));
    }
    

    My question now is... if the order of this is changed so the first 2 "echo" lines were moved down in the page somewhere after the if ($this->data('EmailConfirmed') might this not cause the trigger for the errors until it has checked and found that the email is confirmed and then NOT display the error message? if you think this might work where would you suggest moving those lines to so it doesn't mess the code up?

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    What are the settings you have in the dashboard pertaining to the embed ?

  • I am guessing you are asking if I have the "Force the forum to only be accessible through this url" checked and the answer is Yes, this is checked. (The Dashboard is unchecked)

    The url where the forum is embedded: is set to http://ourdomain.com/wordpressembedpage/

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    Can you try to uncheck in the dashboard Force Url And see if the same thing happens or not ?

  • No, it does not. I have already checked that. When you click the link in the email when the option is unchecked it takes you to the non-embedded version of the page and it states that the Email is now confirmed.
    The problem is that when it is checked, it still goes to that same page, still says it is confirmed and then the page reloads within the Embedded page and that is where the Error shows. I am sorry when I wrote this an hour ago I wasn't as clear as I could have been.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    I recommend not using Force Url for the time being, it looks as though there may be a bug somehow.

    My idea of fixing it would be to find out the redirect url that sends users to the stand alone forum and redirect that to the discussions page of the embedded one.

    That is how in theory it should work …. maybe @hgtonight has an idea or someone else more savvy than I am.

Sign In or Register to comment.