We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10
    • 16 Posts
    Ok, i am an admitted cut&paste Queen and very new to Modx
    So this is probably obvious to someone else, but for the life of me i am not seeing it.

    I have ModX version 0.9.6.1 WebloginPE V1.3.1
    I have spent the last week on this, several hours a day
    When i first set this up, it was not working at all
    I have figured out what not to do... and i am still looking for what ’to do’...lol
    I have learned Not to cut and paste into TinyMCE.. because it chews up the code and spits it out wrong
    i have learned not to use ’ but to use ` instead
    (Never even heard of a backtick before last night and hours of searching through the forums )
    I am not using friendly url’s

    I have my user list set up finally
    http://deviantdesigns.org/index.php?id=128

    But when i click on their picture, i get this
    http://deviantdesigns.org/index.php?id=128?service=viewprofile&username=jesika

    The url seems to be correct, but what is displayed is a 404

    On page 128 this is all i have
    [!WebLoginPE? &type=`users` &usersList=`Administrators:default:default:internalKey:ASC:webgroup(Site Admins)||Deviant Designs Members:default:default:username:ASC:webgroup(Registered Users)` &customFields=`website, aim, msn, address1, city, favorite_color, demographic, emailprivate, aimprivate, msnprivate` &viewProfileTpl=`my_profile_tpl`!]

    In my chunks i have the following chuncks
    # my_profile_tpl (harvested from searching the forums)
    # onlineOuter (From SD’s Demo page)
    # onlineUser (From SD’s Demo page)
    # UserOuterTpl (from the default folder)
    # UserTpl (from the default folder)
    # ViewProfileTpl (from the default folder)


    I tried the advice here
    http://modxcms.com/forums/index.php/topic,21718.0.html

    With just the call of
    [!WebLoginPE? &type=`users` &viewProfileTpl=`my_profile_tpl` !]

    And both attempts still caused the url to look correct, but issue a 404

    Am i missing a chunk? did i set my call wrong?
    I hope someone can help, cause this is really driving me nuts
    Thanks in advance for anyone who can help me out
      • 4310
      • 2,310 Posts
      If you change the second ? to & in the url manually, so it is :
      http://deviantdesigns.org/index.php?id=128&service=viewprofile&username=-leora-
      it then works.
      I read somewhere about having two ? causes MODx a problem.
      What happens if you turn on FURL’s? (this would remove the first)
        • 4041
        • 788 Posts
        Here is a method to quickly fix this issue which I use to determine the correct seperator for the urls. It checks for friendly and then sets [+link_Sep+] placeholder accordingly, which is then used in your templates in spots where the ? is hard coded.

        1. In your webloginpe snippet in the modx manager, paste the following code somewhere at the top:

        // url and page link placeholders ///////////////////////////////
        if($modx->config['friendly_urls'] =="1"){
         $seperator ="?";
        }else{
         $seperator ="&";
        }
        // set placeholder =  [+link_Sep+]
        $modx->setPlaceholder('link_Sep',$seperator);  
        /////////////////////////////////////////////////


        2. Modify your templates to use the [+link_Sep+] placeholder instead of a ? in the links.
        ex: webloginpe.templates.php (around line 434)
        $wlpeUsersTpl = '<div class="wlpeUserPage">
                        <div class="wlpeUserPagePhoto">
                                <a href = "[~[*id*]~][+link_Sep+]service=viewprofile&username=[+view.username+]">
                                        <img src="[+view.photo+]" alt="[+view.photo+]" title="[+view.username+]" height="100" width="100" />
                                </a>
                                <a href = "[~[*id*]~][+link_Sep+]service=viewprofile&username=[+view.username+]">
                                        <p class="wlpeUserPageUsername">[+view.username+]</p>
                                </a>
                        </div>
                        <div class="wlpeUserPageUserContent">           
                                <p class="wlpeUserPageAttrUsername"><span class="wlpeViewUsersUsername">Username</span>: [+view.username+]</p>
                                <p class="wlpeUserPageAttrAge"><span class="wlpeViewUsersAge">Age</span>: [+view.age+]</p>
                                <p class="wlpeUserPageAttrLastLogin"><span class="wlpeViewUsersLastLogin">Current Status</span>: [+view.status+]</p>
                                <blockquote class="wlpeUserPageAttrComment">[+view.comment+]</blockquote>
                        </div>
                </div>';
          xforum
          http://frsbuilders.net (under construction) forum for evolution
          • 18878
          • 210 Posts
          Breezer thanks a lot for the quick fix!
            • 10
            • 16 Posts
            Thank you so very much!
            It worked perfectly!