ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Dynamic Parameters on custom fields

October 06, 2010 5:54pm

Subscribe [6]
  • #16 / Oct 13, 2010 10:20pm

    John Henry Donovan

    12339 posts

    derek,

    Template code I am using. Not using htaccess to disable index.php. So you might want to disable that too

    <form method="post" action="{path='about/test'}">
    
    <select name="search:state">
      <option value="Connecticut">Connecticut</option> 
      <option value="Massachusetts">Massachusetts</option>ion>
    </select>
    
    <select name="sort">
    <option value="asc">Ascending</option>
    </select>
    
    <input type="submit" value="Go!" />
    
    </form>
    
    {exp:channel:entries channel="dropper"  dynamic_parameters="sort|search:state"}
    <h1>{title}</h1>
    {state} 
    <hr>
    {/exp:channel:entries}
  • #17 / Oct 18, 2010 12:12pm

    tunnel7

    125 posts

    OK, since my last post I have determined that there are other issues as well.  I do suspect the server environment here being the issue and to that end I have installed a phpinfo script (thinking it may be helpful to troubleshoot):

    http://www.sexhealthmatters.dreamhosters.com/phpinfo.php

    The issue is not just the dynamic variables.  It is anything that it a form that the user is submitting.  I have freeform installed and the forums installed and if you go to the front end for either of these you are just taken to the homepage (for freeform) or just stay on the forum post entry page (forums) but in both cases nothing happens (no error checking, no processing, nothing - no data gets entered into the DB either).

    I have ruled out my form code (it works in the same environment in another setup) and I have ruled out hiding the index.php file (I use the exclude method).  I have a support request in to dreamhost as well.  I realize that this falls into a gray area (Dreamhost doesn’t support EE and you don’t support Dreamhost) but if you have any thoughts / suggestions it would be greatly appreciated.  At this point I’m trying to avoid moving to a new server but at the same time I need to keep things moving.

    I thank you in advance.

  • #18 / Oct 18, 2010 10:19pm

    Lisa Wess

    20502 posts

    tunnel7 - could you please post the entire contents of your .htaccess file? We most commonly see this when forcing the inclusion or exclusion of “www”.

  • #19 / Oct 19, 2010 9:46am

    tunnel7

    125 posts

    Lisa,

    Thanks for the quick reply.  Here are the complete contents:

    # .htaccess MASTER FILE 
    # UNCOMMENT (REMOVE #) OR DELETE AS NEEDED
    #=======================================
    #
    #
    # FOR SETTING UP BASIC AUTHENTICATION 
    # WILL REQUIRE THE .htpasswd FILE
    # <a href="http://www.tools.dynamicdrive.com/password/">http://www.tools.dynamicdrive.com/password/</a>
    #=======================================
    #
    #AuthName "Restricted Area" 
    #AuthType Basic 
    #AuthUserFile /home/kwhome/.htpasswd 
    #AuthGroupFile /dev/null 
    #require valid-user
    #
    # FOR DEFINING ERROR PAGES 
    #=======================================
    #
    #ErrorDocument 401 /401.php
    #ErrorDocument 403 /403.php
    #ErrorDocument 404 /404.php
    #ErrorDocument 500 /500.php
    #
    # FOR PREVENTING DIRECTORY LISTING FROM
    # SHOWING UP IF FOLKS ENTER A PATH
    # NOTE: TO ALLOW AN INDEX OF ONLY ONE DIRECTORY SIMPLY CREATE A NEW .htaccess FILE AND PUT IT IN THAT DIRECTORY WITH Options +Indexes
    #=======================================
    #
    #Options -Indexes
    #
    # FOR ALTERING DEFAULT MAX UPLOAD SIZE
    #=======================================
    #
    #php_value upload_max_filesize 50M
    #php_value post_max_size 50M
    #
    # FOR REDIRECTING OLD URLS TO NEW URLS
    #=======================================
    #Redirect /olddirectory/oldfile.html <a href="http://yoursite.com/newdirectory/newfile.html">http://yoursite.com/newdirectory/newfile.html</a>
    #
    # FOR REDIRECTING NON-WWW URL TO WWW URL - CHANGE tunnel7.com TO WEBSITE DOMAIN (THIS NEEDS TO COME BEFORE THE INDEX REMOVAL ON AN EE SITE)
    #=======================================
    #RewriteEngine On
    #RewriteCond %{HTTP_HOST} ^sexhealthmatters\.org$ [NC]
    #RewriteRule ^(.*)$ <a href="http://www.sexhealthmatters.org/$1">http://www.sexhealthmatters.org/$1</a> [R=301,L]
    #
    # FOR REDIRECTING WWW URL TO NON-WWW URL - CHANGE tunnel7.com TO WEBSITE DOMAIN (THIS NEEDS TO COME BEFORE THE INDEX REMOVAL ON AN EE SITE)
    #=======================================
    #RewriteEngine On
    #RewriteCond %{HTTP_HOST} ^www\.tunnel7\.com$ [NC]
    #RewriteRule ^(.*)$ <a href="http://tunnel7.com/$1">http://tunnel7.com/$1</a> [R=301,L]
    #
    # FOR REDIRECTING PARKED DOMAINS - CHANGE tunnel7.com TO WEBSITE DOMAIN (THIS NEEDS TO COME BEFORE THE INDEX REMOVAL ON AN EE SITE)
    #=======================================
    #RewriteEngine on
    #RewriteCond %{HTTP_HOST} ^tunnelseven.com$ [OR]
    #RewriteCond %{HTTP_HOST} ^www.tunnelseven.com$
    #RewriteRule ^(.*)$ <a href="http://www.tunnel7.com/$1">http://www.tunnel7.com/$1</a> [R=301,L]
    #
    # IF USING EXPRESSIONENGINE AT DREAMHOST YOU WILL NEED THIS LINE
    #=======================================
    AddType x-mapp-php5 .php
    #
    # FOR REMOVING index.php FROM THE URLS (INCLUDE METHOD) - THIS IS DONE IN TANDEM WITH SETTING THE NAME OF THE INDEX FILE TO NOTHING IN EE ADMIN - SYSTEM PREFERENCES - GENERAL CONFIGURATION
    #=======================================
    #RewriteEngine on
    #RewriteCond $1 ^(site|search|t7|t7inc|P[0-9]{2,8}) [NC]
    #RewriteRule ^(.*)$ /index.php/$1 [L] 
    #
    # FOR REMOVING index.php FROM THE URLS (EXCLUDE METHOD) - THIS IS DONE IN TANDEM WITH SETTING THE NAME OF THE INDEX FILE TO NOTHING IN EE ADMIN - SYSTEM PREFERENCES - GENERAL CONFIGURATION
    # NOTE: ON THE SECOND LINE THE system PATH WILL NEED TO BE CHANGED TO WHATEVER system WAS RENAMED TO IN THE SETUP PROCESS
    #=======================================
    RewriteEngine on
    RewriteCond $1 !^(images|display|themes|smsna-regform|favicon\.ico|robots\.txt|index\.php|phpinfo\.php|admin\.php) [NC]
    RewriteRule ^(.*)$ /index.php/$1 [L]
    #
    #
    #
    #
    # version 6 - 05 May 2009 (added redirect for www to non-www url)
    # version 5 - 23 Apr 2009 (added exclude method for ee index.php removal)
    # version 4 - 30 Mar 2009 (added parked domain redirect and updated non-www redirect)
    # version 3 - 27 Aug 2008 (added non-www to www redirect)
    # version 2 - 30 May 2008 (added redirects and ee index.php removal)
    # version 1 - 23 Nov 2007 (created master file)
  • #20 / Oct 19, 2010 11:43am

    Lisa Wess

    20502 posts

    tunnel7 - can you please disable your entire .htaccess file (rename it to htaccess.txt, for instance) just temporarily and try this again?  I suspect that this will work without all the .htaccess rules; so then it would just be down to isolating which one is causing you grief.

    Thanks!

  • #21 / Oct 19, 2010 12:08pm

    tunnel7

    125 posts

    Hi Lisa,

    Thanks for the quick reply.  I have disabled the htaccess file entirely (renamed it htaccess.txt and changed my index page in gen. config back to index.php) however I am still experiencing the same results (forms not behaving properly).  For example here is a form with freeform:

    http://www.sexhealthmatters.dreamhosters.com/index.php/share-your-story

    And on the sidebar there is a mailing list form that is behaving the same way (and forums if you go there will do the same thing (no input accepted).

    I don’t think the htaccess file is the issue (I disabled it yesterday in trying to resolve it) ... but if you see something here let me know.  My next step will be to move to a new server environment as I know this code works in those.

    derek

  • #22 / Oct 19, 2010 12:33pm

    Lisa Wess

    20502 posts

    tunnel7 -

    If you go here:

    sexhealthmatters.dreamhosters.com/index.php/share-your-story

    You’ll see that it immediately redirects to www.  That is most likely the issue here.  Can you disable that?

  • #23 / Oct 19, 2010 3:03pm

    tunnel7

    125 posts

    Issue is resolved!  Thank you for pointing me in this direction.  What it ended up being is that when the hosting account was setup at Dreamhost (this is my first time running EE at Dreamhost) there are radio buttons to redirect non-www to www and the like.  This creates an htaccess file (assumedly) somewhere on the dreamhost server but outside of my account directory so I never saw it and never thought to disable it.  Typically I always do that using the htaccess file at the root.  When I turned off this feature the forms started working and all is well, including the physician finder prototype.

    I thank you for going the extra mile on this one.

  • #24 / Oct 19, 2010 3:12pm

    Ingmar

    29245 posts

    Excellent news! Very glad to see you’re all set. Please do not hesitate to post again in case there’s anything else.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases