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.

Getting the page with DeliveryType=VIEW sends the whole page NOT just the form

HazuluHazulu New
edited April 2015 in Vanilla 2.0 - 2.8

@x00

Hello~

I'm trying to grab the registration page with DeliveryType=VIEW, but I'm receiving the entire registration page. How would I go about making it so I can receive the registration form and not the entire page? As long as I haven't replied to this thread, I am still working on a fix.

Comments

  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited April 2015

    A "view" is actually a page, the whole page.

  • HazuluHazulu New
    edited April 2015

    Without this plugin enabled if I go to:
    http://forum.example.com/entry/register?DeliveryType=VIEW

    It just has the form there, that I can inject into a popup, or into another element in my case. I want to load this page into another using the AJAX load method. Instead of just the registration form, the entire page is here so injecting it ends up bringing the entire page over.

    Also: The reason I'm looking to modify the plugin instead of changing the way I'm getting the registration page is because I'm trying to make my plugin as dynamic as possible to avoid confusion and conflicts. I will try and load the page and target a the containing DIV.

  • HazuluHazulu New
    edited April 2015

    :/ didn't work. On localhost it brought me to a signin page. I changed it to be:
    http://localhost/vanilla/index.php?p=/entry/register&DeliveryType=FORM
    But it gave me an error for invalid DeliveryType, and when I switch the end to VIEW it goes to what it should be.

    When I disable this plugin, I get what it should look like: http://puu.sh/hmfjq/c9cb03041f.png

    However, when I enable the plugin I get this: http://puu.sh/hmfmM/f40ccb1335.png

    As you can see the entire page is being loaded when I use the
    /entry/register&DeliveryType=VIEW
    With this plugin enabled. So I don't think anything I do except changing the plugin will work.

    Edit (Explanation): I'm making a plugin that will end up replacing the body content of the forums with the registration page. At the moment I'm using the .load() method to replace the inside of the forum.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited April 2015

    I tested that DeliveryType on a live forum. I don't know what would happen on local.

    Also keep in mind that things work better when pretty url is enabled and htaccess rewrite base is correct.

    See it work on my Forum.

    http://www.vrijvlinder.com/forum/entry/register?DeliveryType=FORM

    Granted I am using invitation mode which does not have captcha, which may be your problem.

    This may be related but not sure..

    https://github.com/vanilla/vanilla/issues/1676

  • Hmm, I received a fatal error on a live host as well. I disabled the plugin as well, when I enable the plugin it just goes to the registration page.

    http://prestige5.net/entry/register?DeliveryType=FORM

    If you want to see what I'm trying to do I just released the plugin on the forums. I disabled the registration portion of it though, but regardless you should be able to see what I'm trying to accomplish.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    It could be a theme thing or other js interfering . Or the url

    This also works for me to just get the sign in form ...

    http://www.example.com/forum/entry?DeliveryType=FORM

    Maybe try another theme to see if that maybe be the cause , It is hard to say really... I don't get an error on DeliveryType unless the url structure is wrong.

  • HazuluHazulu New
    edited April 2015

    It's not the theme, it's the plugin. I develop all my plugins using the default theme.

    And I'm not having a problem getting the view without the plugin.

    The plugin does something to the view and includes the whole page instead of just having the registration form.

    Not sure if there's another way to do this though... But I was trying to make my plugin compatible with this one.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    Check to make sure you are not rendering a Master view or a default view somewhere in your plugin.

    $Sender->Render($this->GetView

  • I'm not, and if I was then when I disabled this plugin I would still have the same problem. :/

  • There is no DeliveryType=FORM

    grep is your friend.

  • @Hazulu I will look into this for you. Note if it worked you would still have to include the scripts for it to to work.

    grep is your friend.

  • x00x00 MVP
    edited April 2015

    I think I figured out the problem.

    grep is your friend.

  • here

    http://vanillaforums.org/addon/nocaptcharecaptcha-plugin

    you would need to include script

    https://www.google.com/recaptcha/api.js

    in the parent page for it to work

    grep is your friend.

  • ^-^ thank you~

Sign In or Register to comment.