Google Charts Integration - Strange Prolem

SuiteCRM 8.5
MariaDB 10.5.22
MySQL Client 8.1.27
PHP 8.1.27

We have a version of 8.5 running with integrated Google Charts which has run fine on v8.2.4 and 8.5 for some time, no issues.

We have recently imlemented a ‘clean’ V8.5 using softaculous and this also runs fine. Clean database etc… Google calendar integration done, etc…

Just came to implement Google Charts again - did the Paul Stevens security mod and the entry points and main chart php files (actually copied from the other 8.5 version where it runs fine. Ran a quick repair to ensure entry points were registered etc…

The only difference between the two instances is that the new one runs under a sub-directory off the main public-html directory, whereas the original is straight frrom there. They never run at the same time, which would probably cause issues.

When we try to insert a web dashlet using the https://Suitecrmpath/sub-directory/public/index?entryPoint… address, it simply adds in the main dashboard’s first column. See below.
The PHP code for entry point and main charts are all fine however, trying to execute just as a web address in the browser does exactly the same thing.

So it would seem that the path is not being satisfied in the entry point. This is set to ‘custom/googlecharts’ or whatever the chart is we want to display - we have a number of them.

Do I need to change this as the instance is in a sub-directory ? I didnt think so but I have also tried the normal path variations to ‘force it’ but they all do the same thing. It may be that it is late in the day and i’ve been looking at this too long but I can’t spot what is causing this to happen.

The code in the entry point php and associated chart php referrred to above are identical to @pgr post on setting up a google charts integration, which is this link,pgr,!,-1

We have made a few changes to that particular chart as we didn’t want a bubble chart or sankey diagram and our database SQL Select is different, as we wanted to model different opportunity data, but it is otherwise identical.

If anyone has any clues, I am open to any suggestion.

Many thanks for your patience :slight_smile:

I don’t think you should ever be seeing a public in a URL. I suppose that if you can get the URL right, you should be able to see it in the dashlet - though I haven’t tried this in v8, ever.

You can try the URL by itself on a separate tab, see if it spits out the dashlet’s HTML correctly.

Looking at the live v8 demo, at a legacy module, I see URL’s like this:

The dashlets should use a similar structure, so maybe for you it could be

@ggraynoth can you reach the URL in a browser? If you can’t it wont work in your dashlet. If you can, then you might need to change your URL in config file to the actual path where your SutieCRM is (since you moved it). I would try those two things first.

That reminds me I need to do a PR for that one!

Thanks both. Still no joy.

Regarding the /public, on our other instance, the URL does include the /public and legacy is a directory off /public. That is how it was installed. The new instance is the same but with a sub-directory off the main public_html. /public is then off that and legacy off public, so same structure just with a sub-directory in between.

I thought that I had found the issue as there is a .htaccess file in the sub-directory which does a redirect , as below, which must have been created when the instance was installed via softaculous but getting rid of this didn’t change anything either.

.htaccess file just contains

<IfModule mod_alias.c>
RedirectMatch 301 ^/temsuite8-5/$

That is it.

I have tried all logical combinations of URL to get this to work both as a dashlet and just from the browser directly but can’t crack it for some reason. There must be something messing up the URL but I am damned if I can find it.

I’ll keep looking, as this is something we use a lot and I need to resolve.

Probably staring me in the face but frustrating never the less.

First get your installation properly configured, then take care of the chart.

“Properly configured” means:

  • web root is public, and the word public never, ever, nowhere appears in URLs
  • if you had rewrites or rules in any htaccess file that were meant to patch up the problems arising from the misconfiguration, then now you need to undo them, or do them right.

I agree with you totally.

However, as our main instance runs ‘properly configured’ this second instance was installed using softaculous in a sub-directory and as it is on a shared server, we have limited control over this.

This type of install, as you probably know, is largely automated but this is exactly how it installed the 8.5 version in that sub-directory.

This is the only problem of this type that we have had with it, so I will sort and report back once fixed.

Thanks again.

Apologies both, this was completely my fault !

Having spent 1/2 day troubleshooting this it all came down to a stupid, stupid mistake on my part, setting things up in a hurry. It suddenly occurred to me, which should have been much sooner, that the entry points were being ignored as the code drops back to the initial dashboard. Hence seeing that in the dashlet iframe.

Checked the entry point register and it wasn’t there! So going into the /custom/Extension…/Entry PointRegister directory, I spotted that the directory that I had created was in fact EntryPointsRegister with the added ‘s’.

Renamed it correctly, ran a quick rebuild - hey presto, all URLs work fine.

What a doughnut. I can only apologise for wasting your time and brain power.

I will do the config tidy up when we have finished this pilot customisation tidied everything up and signed off on it.

Just included a picture to show you it works :roll_eyes:. and thank you for your wise words. Just wish I hadn’t typed the spurious ‘s’ and all would have been well.

1 Like


Just to confirm, we have been through the test install and fixed the errant files (.htaccess etc) that was causing the issue. This was created on install, so maybe a softaculous issue.

Anyway, no more public and everything working as expected.

Thanks for picking us up on that. now sorted.

1 Like