We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38188
    • 17 Posts
    Hi,
    I am having some trouble understanding how to make links work for tags and Archives to bring up the right content. Right now tag and archive links are pointing me to a blank page.

    I am trying to make this sample blog work, so I can re-create one for a client, who needs one asap, nut would hate to have to go to different platform. If anyone could point me the right direction, it would be greatly appreciated, and I would write up solution.

    I'm using MODX2.2 rc3, Articles 1.4.2, (same was true with previous version of articles),
    Sample BLOG: http://limabeanweb.com/testMODX22/index.php?id=2
    User: testModx22/testing (this sample blog will be removed once I figure out how to make it work)

    I have a feeling I am missing something obvious, just can't figure it out. I followed instructions at http://rtfm.modx.com/display/ADDON/Articles#Articles-WhatisArticles%3F
    - Installed Articles
    - Created main blog page (id=2)
    - created two sample articles
    - assignes tags to sample articles, published them.
    - under chunks >> articles >> sample.ArticleRowTpl - I changed &target=`[[*id]]` to &target=`2`, under !tolinks?.....

    Do i need to create "tag" and "Archive" pages somewhere? The directions i followed did not specify that and made it sound like it is all done automatically... that is following what i did should have made functional blog. I have been playing with this for so long, and cannot figure it out.

    Any help appreciated. Let me know if i'm posting this the wrong way, as i'm fairly new here.
    THANKS!
      • 22840
      • 1,572 Posts
      Can you try enabling friendly url's and then try it ( you need to rename the ht.access file to .htaccess and then enable it in the system settings )
        • 38188
        • 17 Posts
        Thank you so much for your reply. I did what you suggested:

        - renamed ht.access to .htaccess
        - enabled friendly URLs in system settings:
        * Use friendly URLs = Yes

        Now when I preview the blog, it gives me "The requested URL /index.php was not found on this server.", then I remember that i used alias, so in system settings I set
        * Use Friendly Alias Path = Yes,

        Still same error message. Sorry I am not a programmer, i'm a designer trying to make it work. THANKS for any further help.
          • 22840
          • 1,572 Posts
          That would normaly mean the htaccess file hasn't been picked up, can you confirm it's defo called .htaccess and also post the content of it here.
            • 38188
            • 17 Posts
            Thanks for your reply.
            I have three .htaccess files, one in the site root (public_html), one in folder where i installed MODX (testMODX22/.htaccess), and one in manager folder (testMODX22/manager/.htaccess)

            - I renamed all 3 to .htaccess
            - now i see there are directions on what needs to be changed within .htaccess file, but which one do I need to change, all 3, or one in root? sorry if this is really silly question.
              • 22840
              • 1,572 Posts
              Just change the one in testMODX22 directory, i'm no expert for htaccess but you may need to change the baseurl from / to /testMODX22/
                • 38188
                • 17 Posts
                public_html/testMODX22/.htaccess file contents are:
                # Friendly URLs Part
                RewriteEngine On
                RewriteBase /testMODX22
                RewriteCond %{HTTP_HOST} .
                # Force all pages to go to www.domain.com for SEO
                RewriteCond %{HTTP_HOST} !^www\.limabeanweb\.com [NC]
                RewriteRule (.*) http://www.limabeanweb.com/$1 [R=301,L]
                # Friendly URLs
                RewriteCond %{REQUEST_FILENAME} !-f
                RewriteCond %{REQUEST_FILENAME} !-d
                RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
                # Additional Settings Follow
                ExpiresActive On
                ExpiresByType image/gif A2592000
                ExpiresByType image/jpeg A2592000
                ExpiresByType image/png A2592000
                BrowserMatch "MSIE" brokenvary=1
                BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
                BrowserMatch "Opera" !brokenvary
                SetEnvIf brokenvary 1 force-no-vary

                  • 38188
                  • 17 Posts
                  Paulp, thanks for your help, at least now i know where to look for a solution. I disabled above account, as it was starting to act strange in backend manager.

                  I will play with .htaccess file and update post with my results. Thanks!
                    • 22840
                    • 1,572 Posts
                    The friendly url's and tags etc are working, theres just the issue with the folder it's in, try replacing the htaccess with the following which is the default modx one for 2.2 with just the base url changed:

                    # MODX supports Friendly URLs via this .htaccess file. You must serve web
                    # pages via Apache with mod_rewrite to use this functionality, and you must
                    # change the file name from ht.access to .htaccess.
                    #
                    # Make sure RewriteBase points to the directory where you installed MODX.
                    # E.g., "/modx" if your installation is in a "modx" subdirectory.
                    #
                    # You may choose to make your URLs non-case-sensitive by adding a NC directive
                    # to your rule: RewriteRule ^(.*)$ index.php?q=$1 [L,QSA,NC]
                    
                    RewriteEngine On
                    RewriteBase /testMODX22/
                    
                    
                    
                    # Rewrite www.domain.com -> domain.com -- used with SEO Strict URLs plugin
                    #RewriteCond %{HTTP_HOST} .
                    #RewriteCond %{HTTP_HOST} !^example-domain-please-change\.com [NC]
                    #RewriteRule (.*) http://example-domain-please-change.com/$1 [R=301,L]
                    #
                    # or for the opposite domain.com -> www.domain.com use the following
                    # DO NOT USE BOTH
                    #
                    #RewriteCond %{HTTP_HOST} .
                    #RewriteCond %{HTTP_HOST} !^www\.example-domain-please-change\.com [NC]
                    #RewriteRule (.*) http://www.example-domain-please-change.com/$1 [R=301,L]
                    
                    
                    
                    # Rewrite secure requests properly to prevent SSL cert warnings, e.g. prevent 
                    # https://www.domain.com when your cert only allows https://secure.domain.com
                    #RewriteCond %{SERVER_PORT} !^443
                    #RewriteRule (.*) https://example-domain-please-change.com.com/$1 [R=301,L]
                    
                    
                    
                    # The Friendly URLs part
                    RewriteCond %{REQUEST_FILENAME} !-f
                    RewriteCond %{REQUEST_FILENAME} !-d
                    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
                    
                    
                    
                    # Make sure .htc files are served with the proper MIME type, which is critical
                    # for XP SP2. Un-comment if your host allows htaccess MIME type overrides.
                    
                    #AddType text/x-component .htc
                    
                    
                    
                    # If your server is not already configured as such, the following directive
                    # should be uncommented in order to set PHP's register_globals option to OFF.
                    # This closes a major security hole that is abused by most XSS (cross-site
                    # scripting) attacks. For more information: http://php.net/register_globals
                    #
                    # To verify that this option has been set to OFF, open the Manager and choose
                    # Reports -> System Info and then click the phpinfo() link. Do a Find on Page
                    # for "register_globals". The Local Value should be OFF. If the Master Value
                    # is OFF then you do not need this directive here.
                    #
                    # IF REGISTER_GLOBALS DIRECTIVE CAUSES 500 INTERNAL SERVER ERRORS :
                    #
                    # Your server does not allow PHP directives to be set via .htaccess. In that
                    # case you must make this change in your php.ini file instead. If you are
                    # using a commercial web host, contact the administrators for assistance in
                    # doing this. Not all servers allow local php.ini files, and they should
                    # include all PHP configurations (not just this one), or you will effectively
                    # reset everything to PHP defaults. Consult www.php.net for more detailed
                    # information about setting PHP directives.
                    
                    #php_flag register_globals Off
                    
                    
                    
                    # For servers that support output compression, you should pick up a bit of
                    # speed by un-commenting the following lines.
                    
                    #php_flag zlib.output_compression On
                    #php_value zlib.output_compression_level 5
                    
                    
                    
                    # The following directives stop screen flicker in IE on CSS rollovers. If
                    # needed, un-comment the following rules. When they're in place, you may have
                    # to do a force-refresh in order to see changes in your designs.
                    
                    #ExpiresActive On
                    #ExpiresByType image/gif A2592000
                    #ExpiresByType image/jpeg A2592000
                    #ExpiresByType image/png A2592000
                    #BrowserMatch "MSIE" brokenvary=1
                    #BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
                    #BrowserMatch "Opera" !brokenvary
                    #SetEnvIf brokenvary 1 force-no-vary
                    
                      • 38188
                      • 17 Posts
                      Yes!!! I did change my .htacces to what you show. Most links work great now!

                      PREVIEW:
                      http://limabeanweb.com/MODX-testSite-22/blog/

                      QUESTION:
                      tags by each post, they link to the right content:
                      http://limabeanweb.com/MODX-testSite-22/blog/tags/tag03

                      but tags on bottom of page link to:
                      http://limabeanweb.com/MODX-testSite-22/blog/articlestags/tag03
                      which does not bring the right cotent. Does anyone know how to make tags at the bottom link to the right place?

                      hopefully this is my last question. I plan on creating a pdf of my steps in creating this sample blog, in case some other "designer" comes across the same issues.

                      Thank You so much!