We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38783
    • 571 Posts
    Quote from: Steeve at Aug 17, 2016, 06:29 AM
    For understanding :
    $url = MODX_ASSETS_PATH . 'css/myfile.css';
    $url = MODX_ASSETS_PATH . 'js/myfile.js';

    It's PHP code! MODX_ASSETS_PATH will be replaced by defined modx_assets_path in the file config.inc.php inside the folder core/config.
    The page from Bob guides where you find this code speak about third-party components (MODX EXTRA).


    Thanks Steeve.
      If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

      email: [email protected] | website: https://andytough.com
      • 38783
      • 571 Posts
      Quote from: juliehoy at Aug 16, 2016, 10:33 PM
      Quote from: andytough at Aug 16, 2016, 10:08 PM
      Just found this on line 354 of style.css
      .content {
      width: 100%; padding-left: 250px; position: relative; left: 0px; opacity: 0;
      }
      The opacity: 0 is making the content invisible

      I AM a bit confused about this CSS (I'm using a template called Other from Tommus Rhodus):

      There was also this bit that I commented out: /*section.content .article-nav {display: none;}*/
      -- because it would seem that would make the content of a section and the article-nav not display.
      However it was displaying both, with or w/o that css.

      Likewise, I took out that opacity: 0; bit and nothing changed.

      How is this possible?

      I think the CSS is being cached in your browser or by the server. See Frogabog's suggestions above regarding clearing the MODX cache.
        If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

        email: [email protected] | website: https://andytough.com
        • 52609
        • 32 Posts
        Hi Kori! Thanks a ton for your insights! I've looked into everything you mention...

        Quote from: frogabog at Aug 17, 2016, 04:31 AM
        MODX's default "page not found" is always ID 1 unless you change that in the System Settings. Typically, you'll want to make an Error Page resource, and in System Settings change the ID to your new resource (page).

        This makes sense. I made an Error page and set the ID in system settings.

        Quote from: frogabog at Aug 17, 2016, 04:31 AM
        The gallery.html page... did you install Gallery from Extras? I haven't used Gallery in years, but some Extras do create resources upon installation.

        Nope, I just used the name "Gallery" for a chunk. But "gallery.html" doesn't have anything to do with that chunk. "gallery.html" now gives the error page! =)

        Quote from: frogabog at Aug 17, 2016, 04:31 AM
        There is also a system setting for a default template, you may want to check that it's set to the one you want to use as default.

        Checked! Set at 1, which is what I'm using.

        Quote from: frogabog at Aug 17, 2016, 04:31 AM
        As I read through this thread, I haven't seen that you've cleared the core/cache files. This would be something to do first when issues like this occur. You can do it by actually deleting all the files in the core/cache folder or my favorite shortcut to opening up the file manager is using Bob Ray's CacheClear snippet http://bobsguides.com/cache-clear-tutorial.html

        Yes! I think it was definitely a cache issue. The weirdness came back again last night and then fixed itself again. I deleted all the cache files in core/cache and have not had any problems since. That will be my new go to. Is there any reason not to just delete those files, as that's super easy for me since I always have a file manager open. Also, I thought this is what I was doing when I went to Manage, Clear Cache in the manager. If that command doesn't clear core/cache, what does it do?

        Quote from: frogabog at Aug 17, 2016, 04:31 AM
        I'm going to second Bob's suggestion to not use Softaculous for installing or upgrading MODX. Really, it's only caused me pain and agony. Something's always not right. A major issue has been database collation. It's good that you've reinstalled (mostly) manually using the UpgradeModx tool but I feel that using it without following the full upgrade process could be an issue (I'm a 'lil paranoid. I also like to do upgrades old school style and just extract MODX.zip on the server. It's not exactly difficult or time consuming). So even if I do use it to upload the new MODX files, I also make sure to do all the things such as updating extras and clearing the cache as is found here: https://rtfm.modx.com/revolution/2.x/administering-your-site/upgrading-modx

        I think you're saying that I should follow the Pre-Upgrade Checklist on that page before using Bob's Extra, if I don't do the whole thing myself manually? It says to "flush sessions." I see a Flush Permissions option - is that what is meant?

        Quote from: frogabog at Aug 17, 2016, 04:31 AM
        Another thing to consider is your rewriteBase in .htaccess. It appears that this domain is a subdomain or is living in a subfolder of a WP site, no? If so, make sure to change:

        RewriteEngine On
        RewriteBase /

        to
        RewriteEngine On
        rewriteBase /subdomain/


        (not sure how a subdomain (or site located in a subfolder of public_html) would even work without that but it's worth a mention)

        The thing is, weirdness happens if I put the subdomain in the path. The page will initially load fine with or without that. BUT, with the subdomain, I start getting 500 Internal Server Errors as I click around in the page. That doesn't happen when I leave it out.

        Quote from: frogabog at Aug 17, 2016, 04:31 AM
        I'd also suggest checking your configuration files for the correct paths. If you look about half way down on this page, there's a list of them. These also should show your subdomain/subfolder in the path. Make sure that the full path to the MODX installation in the subfolder is set correctly in all the files. https://rtfm.modx.com/revolution/2.x/administering-your-site/moving-your-site-to-a-new-server

        Well, these are what you would expect. For example:

        $modx_base_path= '/home/possibil/public_html/thetaooftype.com/';
        $modx_base_url= '/';

        Which might be why "RewriteBase /" works while "RewriteBase /subdomain/" does not.


        This morning's weirdness -- what's left over from yesterday is the following. At some point yesterday afternoon, I noticed that the title next to the icon in the browser tab was showing [[*pagetitle]]. I changed this in the <head> of my template (which is used for all current pages) to <title>tToT</title>.

        All the pages updated to this except the Contact page. It still shows [[*pagetitle]]. I can't figure out how this could be, when all the caches have been cleared multiple times by now, and [[*pagetitle]] is no where in any of my current code.

        The link to the contact page is in the template. Another strange thing is that if I click the link to the Contact page from the main page, it takes me to the contact page. I click the link to the Contact page from the contact page, however, it takes me to the... main page?! It sure does seem like the contact page is using a different template! But from looking at the page in the manager it is set to BaseTemplate like all the others.

        Thanks again Kori! [ed. note: juliehoy last edited this post 7 years, 8 months ago.]
          • 52609
          • 32 Posts
          Quote from: andytough at Aug 17, 2016, 07:48 AM
          Quote from: juliehoy at Aug 16, 2016, 10:33 PM

          Likewise, I took out that opacity: 0; bit and nothing changed.

          How is this possible?

          I think the CSS is being cached in your browser or by the server. See Frogabog's suggestions above regarding clearing the MODX cache.

          I agree Andy, the weirdnesses seems like cache issues.

          I just cleared all 4 caches I know of: browser, MODX manager, core/cache, and public_html/cache. The [[*pagetitle]] issue I mentioned above did not go away. (The one remaining weirdness).

          Is there other cache secreted away somewhere?
            • 52609
            • 32 Posts
            Quote from: Steeve at Aug 17, 2016, 06:29 AM
            For understanding :
            $url = MODX_ASSETS_PATH . 'css/myfile.css';
            $url = MODX_ASSETS_PATH . 'js/myfile.js';

            It's PHP code! MODX_ASSETS_PATH will be replaced by defined modx_assets_path in the file config.inc.php inside the folder core/config.
            The page from Bob guides where you find this code speak about third-party components (MODX EXTRA).

            Thanks Steeve! This makes a lot of sense. When I was looking at that code, what it looked like to me is linux code used in a .bashrc file to set env variables -- and indeed, it is that sort of thing!

            I guess what I am using is the default for the config.inc.php file, as that is already what is there.

            Does this change my call to the files in anyway, or are they still:

            <link rel="stylesheet" href="assets/css/style.css">

            Thanks Steeve! =)