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.

EE 1.6.6: Export a mailing list

August 23, 2012 5:25pm

Subscribe [2]
  • #1 / Aug 23, 2012 5:25pm

    jeffikonian

    8 posts

    I need to export a mailing list. I followed the instructions here:

    Export Mailing List

    I created a template called export_mailing_list and included the first code sample on that page. I set access to mailing list manager and members. When I click the link to view my rendered page, which should display my mailing list, I get a 404 error at my Web site instead. The link in my browser is:

    http://www.gpl.org/export_mailing_list

    That page doesn’t exist, which explains the 404. I wondered if the problem was related to this bug:

    Bug 17402

    If it is, I cannot figure out how to get to:

    system/expressionengine/libraries/Template.php

    to implement the fix. I can’t see that path from anywhere in my EE control panel. Maybe it’s at my Web site? But what would be the path?

    Finally, how do I determine the correct list_id to display the list I want to export? I have four lists in my mailing list module, two default lists that came with EE and two I created myself. But I don’t find a list properties page anywhere or some other page that might provide the list ids.

    Thank you for any assistance.
    Jeffrey Pike
    Groton Public Library

  • #2 / Aug 24, 2012 2:30pm

    Shane Eckert

    7174 posts

    Hey jeffikonian,

    Thank you for posting your question here on the ExpressionEngine forums.

    If this is that bug, then you will want to FTP to your server to access that file for editing.

    Are you using an .htaccess file?

    What version of ExpressionEngine are you currently using?

    Thank you,

  • #3 / Aug 24, 2012 4:34pm

    jeffikonian

    8 posts

    Hey, Shane, thank you for replying. We’re on 1.6.6. From the information I’ve given, can you confirm whether the problem actually is due to the bug or to something else? Do you need any more information from me to diagnose that?

  • #4 / Aug 24, 2012 4:35pm

    jeffikonian

    8 posts

    Oh, and I’m not the Webmaster here, nor did I set up the Web site. How would I know if I’m using a .htaccess file?

  • #5 / Aug 27, 2012 1:03pm

    Shane Eckert

    7174 posts

    Hey jeffikonian,

    The htaccess file is going to be in the root folder of the website.

    If it is there, can you show me the contents?

    Thank you,

  • #6 / Aug 28, 2012 12:11pm

    jeffikonian

    8 posts

    Here you go, Shane:

    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]

    #—LG .htaccess Generator Start—

    # .htaccess generated by LG .htaccess Generator v1.0.0
    # http://leevigraham.com/cms-customisation/expressionengine/addon/lg-htaccess-generator/

    # secure .htaccess file
    <Files .htaccess>
    order allow,deny
    deny from all
    </Files>


    # EE 404 page for missing pages
    ErrorDocument 404 /index.php?/page_not_found/index

    # Simple 404 for missing files
    <FilesMatch “(\.jpe?g|gif|png|bmp)$”>
      ErrorDocument 404 “File Not Found”
    </FilesMatch>

    RewriteEngine On

    RewriteBase /

    # remove the www
    RewriteCond %{HTTP_HOST} ^(www\.$) [NC]
    RewriteRule ^ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

    # Add a trailing slash to paths without an extension
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
    RewriteRule ^(.*)$ $1/ [L,R=301]

    # Remove index.php
    # Uses the “include method”
    # http://expressionengine.com/wiki/Remove_index.php_From_URLs/#Include_List_Method
    RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5})$
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_URI} ^/(home|ssi|static|page_not_found|young-adults|ask-us
    |childrens-room|about-the-library|news|events-and-activities||about-the-library|
    services|ask-us|support-your-library|childrens-room|young-adults|what-we-have|ev
    ents-and-activities|faqs|members|P[0-9]{2,8}) [NC]
    RewriteRule ^(.*)$ /index.php?/$1&%{QUERY_STRING} [L]

    # Remove IE image toolbar
    <FilesMatch “\.(html|htm|php)$”>
      Header set imagetoolbar “no”
    </FilesMatch>

    #—LG .htaccess Generator End—

  • #7 / Aug 28, 2012 12:36pm

    Shane Eckert

    7174 posts

    Hey Jeff,

    For testing, can you rename that file to htaccess (remove the dot) and then test? You will need to add index.php to the URL.

    Thank you,

  • #8 / Aug 28, 2012 2:44pm

    jeffikonian

    8 posts

    OK, I recreated the template, renamed the .htaccess file and then went to:

    http://www.gpl.org/export_mailing_list/index.php

    Wasn’t quite sure if that was the URL you meant. In any case, I didn’t get the 404 page this time, just an advisory from Google that the link appeared to be broken. If I misunderstood which ULR to append index.php to, please let me know the correct one.

    I have renamed the file back to .htaccess in the meantime. I didn’t know if renaming it without the period would affect the functioning of our Web site.

  • #9 / Aug 28, 2012 2:48pm

    jeffikonian

    8 posts

    One other detail I forgot. I have tried putting the template in the ssi group
    or the * home group. Neither worked, but I wondered if it mattered which group
    I put it in.

  • #10 / Aug 28, 2012 4:59pm

    Shane Eckert

    7174 posts

    Hello Jeff,

    The index.php file was to be added because of the removal of the htaccess file. You may also need to go to the General Configuration and added index.php back. In your case you may not need index.php at all.

    You can also use the following as the htaccess file and not mess with index.php.

    <IfModule mod_rewrite.c>
            RewriteEngine On
    
            # Removes index.php
            RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteCond %{REQUEST_FILENAME} !-d
            RewriteRule ^(.*)$ /index.php/$1 [L]
    
            # If 404s, "No Input File" or every URL returns the same thing
            # make it /index.php?/$1 above (add the question mark)
    </IfModule>

    Either way, the current htaccess file is not supported, so we need to figure out how to operate without it.

    Cheers,

  • #11 / Aug 28, 2012 6:36pm

    jeffikonian

    8 posts

    Thank you for the update, Shane. I have both an index.php and a .htaccess file in my public_html folder. Is that a problem?

    I still need to export a mailing list. What should I do now? Should I replace the unsupported code in my .htaccess file with the code you posted? Should I delete .htaccess or index.php? Or both of them? I guess I can’t tell if we’ve identified the reason why I can’t export a mailing list, so I don’t know what to do.

  • #12 / Aug 29, 2012 1:35pm

    Shane Eckert

    7174 posts

    Hello Jeff,

    Please do not delete index.php or index.html. Those are core files. Removing index.php by using the htaccess file is a different beast. More on that here.

    I believe that the export is not working because of the htaccess file you are currently using. Is there a server admin at your site that you can talk with?

    Here is what you do.

    1. Rename current .htaccess file to oldhtaccess.
    2. Copy down via FTP the oldhtaccess file.
    3. Edit the file with the above code, I will list it again below.
    4. Rename the file locally to newhtaccess.
    5. Upload newhtaccess to the root of your server.
    6. Now rename newhtaccess to .htaccess. <—- note the dot.

    Now you have a support version of htaccess in place.

    Now try to export.

    Cheers,

  • #13 / Aug 29, 2012 2:06pm

    jeffikonian

    8 posts

    Shane, I figured it out. I’m all set. Thank you for your help. You can close this ticket.

    Jeffrey Pike

  • #14 / Aug 29, 2012 5:28pm

    Shane Eckert

    7174 posts

    Hi Jeff,

    That’s awesome!!! Nice work man.

    If you need anything else, please just let me know by opening a new thread.

    Cheers,

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

ExpressionEngine News!

#eecms, #events, #releases