Installing Fred

I have recently tried to install “Fred” but having problems. I have downloaded and installed all the downloads from the Fred website including the creative one page theme. When I try to Assign a template to a theme nothing happens and the and the program hangs. I am using the latest version of Modx Revolution.

When I view a page that uses the creative one page theme it is blank appart from the site title. I don’t think the css file is being used and the href in the source code has [[++fred]]. Is this correct.

Any help would be appreciated.

1 Like

Have you tried/are you able to install FRED through the general MODX package management? From your post it sounds like you downloaded and put everything in place manually. Just in case something was wrong there, you could give this a try.

1 Like

Thanks for the feedback. I installed the package using the MODX package management.

1 Like

What PHP version are you using? I do recall having some issues getting it to work on anything below 7.1 i think.

Also feel free to check

1 Like

I am using PHP 7.2.x. I have tried reinstalling Fred but no improvement.

1 Like

My installation does not behave as the youtube video as the Fred Extras do not allow them creation nor assigning a template. The selection box that comes up does nothing and just hangs there and I have to refresh to get rid of it. I am not getting anywhere with Fred but I would to try using if.

1 Like

You may want to update to php 7.3 or 7.4 if its available. Fred is pretty new and wasn’t (perhaps, I have no inside knowledge) designed to work with older php versions

What does your error log say? Also, what errors do you get on your javascript console when viewing the one pager theme resource?

I’ve had a similar problem before when php-bcmath wasn’t installed on the environment.

1 Like

Please provide the following info:

  • What version of MODX are you using?
  • Which web browser do you use?
  • Any error in the MODX error log and/or web browser console log?

Does this issue still occur when:

  • Opening a private tab/window?
  • Using another webbrowser?
1 Like

I am using Modx version 2.7.2 on Chrome.

Last few lines on Modx error report are:

I have put … in place of the site path

[2019-12-01 15:37:34] (ERROR in xPDO::getService @ …/core/xpdo/xpdo.class.php : 1234) modRestClient::__construct is deprecated since version 2.3.0. Use the modRest classes instead.
[2019-12-01 15:37:34] (ERROR in xPDO::getService @ …/core/xpdo/xpdo.class.php : 1234) modRestClient::__construct is deprecated since version 2.3.0. Use the modRest classes instead.
[2019-12-01 15:37:34] (ERROR in modRestCurlClient::__construct @ …/core/model/modx/rest/modrestcurlclient.class.php : 26) modRestClient::__construct is deprecated since version 2.3.0. Use the modRest classes instead.
[2019-12-01 15:37:34] (ERROR in modRestCurlClient::__construct @ …/core/model/modx/rest/modrestcurlclient.class.php : 26) modRestClient::__construct is deprecated since version 2.3.0. Use the modRest classes instead.

What is php-bcmath that “inside-creative” mentioned above? Is it needed?

I have updated to php 7.3 but still the Create theme and Assign Theme to template just hang.

How do I look if there are errors in the javascript console? Where is it?

All very frustrating.

How do I check whether my site has php-bcmath enabled as Fred requires PHP version 7.1.3 or later to run with support for the php-bcmath extension?

I have checked the php.ini file and the only reference to bcmath is:

[bcmath]
; Number of decimal digits for all bcmath functions.
; http://php.net/bcmath.scale
bcmath.scale = 0

1 Like

I know what it’s like when you can’t get something to work, the frustration can seem endless. Let’s do some checking to see if we can figure out whats going on.

  1. Check php-bcmath is installed.
    Go to Manage > Reports > System info. Look for phpinfo() (Normally the thrid item down) and click View. This will bring up your current PHP config. Now search (ctrl + f) for bcmath. You should see a table that says something like:


    If you don’t see something like the above table or it says disabled, then you’ll need to install or enable it on your hosting.
    Depending on your hosting platform you may be able to do this yourself. Typically if you have SSH access then you should be able to run sudo apt install php-bcmath when logged into your server. If you are using Modx Cloud the BCMath extension is already installed for you.

  2. Check the error log.
    Go to Manage > reports > Error log. In there you’ll find any and all errors produced on your site. Sometimes if the log is to large you’ll need to download it rather than viewing it in your browser. Have a search through the log, it can be quite a pain, but have a search for any error containing ‘fred’. This should help you diagnose any further issues such as missing snippets/ chunks etc.

  3. Check your JS console.
    View the resource you are trying to work with by either right-clicking the resource in the resource tree and clicking view, or click into the resource and click the button that says - “Open In Fred”. Once you’re on the front end, right-click the page and select ‘Inspect’ (on Chrome it’s normally the second to last option).
    You should see something like:


    At the bottom, you’ll see the console, if you don’t see the console click the console tab in the top. Here you’ll see any additional errors as to why Fred isn’t loading up. It could be an issue with an incompatible script on the page. It should help you diagnose the issue.

  4. If none of the above works, double-check that Fred is actually being loaded into the front-end.
    To do this, view the page source, you should see <html lang="en" class="fred--active">. If you don’t then make sure your resource has the correct template assigned to it. If you go into the Fred extra CMP then click themes > themed templates you can see which template you need to assign to your resource.

If none of this helps, send me a PM and I can log in and take a look for you.

Let us know how you get on.

1 Like

Thanks for your feedback “inside-creative”

It appears the bcmath is enabled.
There are no “fred” errors in the Modx error log.
The js console shows the following error list:

Failed to load resource: the server responded with a status of 404 (Not Found)
magnific-popup.css:1 Failed to load resource: the server responded with a status of 404 (Not Found)
fred-bootstrap.css:1 Failed to load resource: the server responded with a status of 404 (Not Found)
/recipe/assets/components/fred/web/endpoints/ajax.php?action=load-lexicons&topics=fredrtetinymce:default,fredfaeditor:default:1 Failed to load resource: the server responded with a status of 500 (Internal Server Error)
fred.min.js?v=462ebe:3 Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0
fred-bootstrap.css:1 Failed to load resource: the server responded with a status of 404 (Not Found)
bootstrap.min.css:1 Failed to load resource: the server responded with a status of 404 (Not Found)
magnific-popup.css:1 Failed to load resource: the server responded with a status of 404 (Not Found)

I used the creative_one_page_theme to get to a resource with Open in Fred button as I could not assign a template to a theme as it just hangs and no themes are shown, see image:

image

The page source shows that fred is active.

You referred to sending you a PM. What is that?

This an image of what I get when I try to create a theme. Note the two themes in the side menu are not shown on the main screen and I have to refresh to get back to the programme.

Any help would be appreciated

1 Like

Can’t really see the errors very well from the low resolution but looks like it’s having trouble loading some javascript from the components folder. ensure they exist and ensure permissions for the folder are set correctly

1 Like

So those css files in your error list are going to be important. The errors are that they can’t be found or opened.

So, assuming @lkfranklin is right which is a safe assumption, pls look in your components folder of your installation (in Modx manager under ‘files’). I guess they will be in components/Fred/js and hope someone will correct me if I am wrong.

Anyway we first must find if the files are there, and then if they are there then we may have a permissions problem, where that folder isn’t accessible to Modx. But, according to the error I suspect the files are not there.

Pls check for those css files, all of them in this list

magnific-popup.css
fred-bootstrap.css
bootstrap.min.css

We seem to have a couple other errors, but let’s go step by step for now.

PM means private message, sometimes its easier to communicate privately, but I hope we can keep all the info here on the public forum so it will help more people.

Great, these are the errors that we want to concentrate on:

Failed to load resource: the server responded with a status of 404 (Not Found) fred-bootstrap.css:1 
Failed to load resource: the server responded with a status of 404 (Not Found) /recipe/assets/components/fred/web/endpoints/ajax.php?action=load-lexicons&topics=fredrtetinymce:default,fredfaeditor:default:1 
Failed to load resource: the server responded with a status of 500 (Internal Server Error)fred.min.js?v=462ebe:3 Uncaught (in promise) 
SyntaxError: Unexpected token < in JSON at position 0 fred-bootstrap.css:1

For starters, it looks like Fred is trying to load from an unusual asset directory location that’s why you’re getting the 404 resources not found error. Any reason why your asset URL is /recipe/assets/ not /assets/? I think this may also be the reason the back end isn’t working as well.

If you have moved your assets directory into the recipes directory then this is why it’s not working. If you haven’t touched the assets dir and its path is still yourwebsite.com/assets/ then you may have a bigger issue at hand. Try these:

  1. Have a look at your htaccess (or nginx config depending on your server) and make sure there are no unusual redirects/ rewrites causing /assets/ to redirect to /recipes/assets/.

  2. check your config.php (/core/config/config.php) and make sure that the assets URL is correct. It really should be at webroot level, not in a secondary directory. i.e. /assets/ not /recipes/assets/.

I think if you work out why FRED is trying to load its files from /recipes/assets/ you’ll fix your issue.

1 Like

Thanks for all your input. I shall look into it when I have a little more time. One think though, the “recipe” folder is a sub-folder of the home site, but the Modx has been installed into the recipe folder.

Thanks once again.

1 Like

Pls again do look around to find the css files, they should have been installed with Fred.

It doesn’t matter where they are to be honest, so long as your links point to them properly (in the <head> or footer section of your page).

Again there may still be other issues but we can fix this one for now and move forward that way