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

Setting up Market Place

This discussion is related to the MarketPlace addon.

I am trying to setup market place and i got the link to finally display on the nav bar but now when you click on it, it auto redirects to a directory thats not there instead of the store link

«1

Comments

  • this sound more of a server issue/routing, rather then vanilla framework level.

    try naming it something that isn't going to collide with architecture, or change your server rules.

    Btw you haven't mention the version of Vanilla you are using, this hasn't been tested on 2.1

    grep is your friend.

  • UnderDogUnderDog Moderator

    Do you have an example website address with the Marketplace installed?

  • jerseyontwo.com click store redirects to jerseyontwo.com/vanilla/marletplace. i get a 404 error and i am using the latest vanilla. Also does anyone know what theme vanilla.org/discussions uses?
    Sorry I know this is a lot.

  • i am using the latest vanilla.

    so, you are using version 2.2???

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    They are using 2.0.18.8, I think they need to change this route in the default.php of the plugin...

        $Sender->Form->InputPrefix='Form';
                if($Sender->Form->IsPostBack() != False){
                    $FormValues = $Sender->Form->FormValues();
                    $Settings=array();
    
    
                        switch($FormValues['Task']){
                            case 'StoreConfig':
                                foreach ($FormValues As $FormIndex => $FormValue)
                                    if(!in_array($FormIndex,array('Task','TransientKey','hpt','Save')))
                                        $Settings['Plugins.MarketPlace.'.$FormIndex]=$FormValue;
                                if(!$Sender->Form->ErrorCount()){
                                    Gdn::Router()->DeleteRoute('^'.C('Plugins.MarketPlace.StoreURI','store').'(/.*)?$');
                                    SaveToConfig($Settings);
                                    Gdn::Router()->SetRoute('^'.C('Plugins.MarketPlace.StoreURI','store').'(/.*)?$','vanilla/marketplace$1','Internal');
                                }
    

    maybe replacing this vanilla/marketplace$1

    with this /marketplace$1 would fix it ?

  • 2.0.18.8 is the version i am using

  • It is still redirecting to vanilla/marketplace

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    did you change that route in the default.php ?

    maybe replacing this vanilla/marketplace$1

    with this /marketplace$1 would fix it ?

    after you change it in the plugin, you need to disable and re enable the plugin for the routes to change.

  • peregrineperegrine MVP
    edited July 2013

    after you change it in the plugin, you need to disable and re enable the plugin for the routes to change.

    sequence does matter. so a slight change to reflect proper sequence....

    before you change it in the plugin, you need to disable

    then change the plugin

    and re enable the plugin for the routes to change.

    otherwise you might have lingering routes that are conflicting.

    Always good to disable, change or upgrade plugin, and then renable - in this proper order.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    vrijvlinder
  • no i am getting a page not found

  • sorry now I am getting a page not found

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    Ok then you need to disable force redirect or whatever you have on there so we can access the site.
    At the moment it send one to the sign in page....

  • it should be disabled

  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited July 2013

    this is the redirected page

    http://jerseyontwo.com/shop

    from

    http://jerseyontwo.com/vanilla/marketplace

    The change was not made or the url would not work...

    There are several other areas you would change that

    try just using marketplace without the slash. Find all and change them. See if that helps

    When you get 404 it means it can't find the file usually because the link to the view store.php is wrong. Or installed wrong in the wrong place.

    make sure you have set your htaccess file correctly . For your forum.

  • yea nothing is working to fix this it just started redirecting back to vanilla/marketplace

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    Can you post the contents of the default.php of the plugin?

    also post the contents of the htaccess file ;

    after you paste , select the code and press the C button so it shows nicely.

  • Of course ill have it up in 40 mins had to run out real quick

    vrijvlinderUnderDog
  •   .htaccess file  
    
    
    # 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>
    
  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited July 2013

    I think you should disable the plugin, then remove it from the server not the dashboard , and reinstall again.

    You should make a back up of your working plugins in any event before you remove anything.

    I installed this in a root install I have and it works, well I need to set up the products etc. but the link to the store works.

    So , try to disable, remove from server, then reinstall.

  • x00x00 MVP
    edited July 2013

    it should redirect permanently anyway, it should be an an internal rewrite, as in should not be apparent.

    anyway it seem to working fine now.

    grep is your friend.

Sign In or Register to comment.