PageSafe not working correctly

How complicated is the test page? At this point, I would be looking at the PHP logs and since we don’t know why there are javascript errors, I would simplify my test page down to the PageSafe stack and a few paragraphs with Stack’s built-in Text stack.

1 Like

It is not too complicated at all but I will try as you suggest and republish to start with.

Just heard back from my web host as follows:

Hi Stephen,

The PHP logs are only viewable from our end, but I have checked the logs and there is nothing at all which gives an indication why it is failing.

If something failed to load with PHP, it would show in the logs, but the logs are not showing any errors at all i’m afraid.

The error: Uncaught TypeError: n.className.indexOf is not a function

Will be made by either a configuration with elements of the site, or a configuration on the site itself which will need to be fixed before it loads for you.

I have pagesafe stack, some basic text and the foundry theme on the page see screen shot. Have now republished to test.

@StephenBishopArtist … and … does this new page work fine?

First attempt it open okay. So I got bold and added back a nav bar stack and republished. It hasn’t appeared yet.

So I can take it stack by stack to repopulate. See how that goes.

My only concern is that it would work and then stop working in the past with out me having made any alterations. So it will take some time testing to see if it works everytime… I hope it does.

I will report back.

Old problem resurfaced. Perhaps it does not like it doesn’t like my nav bar. Or it isn’t my nav bar and it is just what ever the issue is unknown.

Not sure what to do as I use this nav bar on all my pages for consistency. So I wanted to use it with the pagesafe page as well.

I can try taking the nav bar off and see how it goes to try to pin down the problem…

@StephenBishopArtist All I can say is I’ve used PageSafe on multiple websites, all with Foundry, all with a navbar, and zero problems.

Clearly there’s something “weird” in your setup but I have no idea what it is. I almost wonder if you have added a PHP snippet somewhere that conflicts with PageSafe. Check on your page where PHP can be added, and in the Code section where you can add PHP and other code across the entire site.

In the end probably what is needed is for you to send your project file to some kind person so they can review it. I can’t do that: I’m not very PHP savvy. Maybe someone else can, or Joe can. But you are definitely experiencing something abnormal and weird.

2 Likes

Stephen,
When you had the page working (without navbar), did the JavaScript errors go away?

Are you sure of the version of PHP you are running?
You can test be adding this code to an HTML stack and placing it on a page set to a file named index.php.

<?php
echo 'Current PHP version: ' . phpversion();
?>

And what about the log files?

1 Like

Thank you.

When the page worked (when the nav bar was removed) I don’t know about the JavaScript errors as I am not sure how to check this.

PHP is 7.3.22.

The host said the following:

The PHP logs are only viewable from our end, but I have checked the logs and there is nothing at all which gives an indication why it is failing.

If something failed to load with PHP, it would show in the logs, but the logs are not showing any errors at all i’m afraid.

The error: Uncaught TypeError: n.className.indexOf is not a function

Will be made by either a configuration with elements of the site, or a configuration on the site itself which will need to be fixed before it loads for you.

Are you using a Stacks 4.1 beta? Can you test a new PageSafe stack on the page with no changes to the default settings. Do not add PageSafe to a partial.

Hi Joe,
looks like I am using Stacks 4.0.4 not 4.1 beta.
I have not added PageSafe to a partial.
Just wondering if any of my plugins or addons could be an issue? I will take a screen shot of them.

It isn’t working this morning with the satnav bar added.
I will add a new PafeSafe to the page with no changes to the default settings.

I don’t have any PHP code added.

The only pages that show PHP my Contact and Join Mailing List page, these both work fine.

PageSafe is PHP too but not working well.

I have google analytics in the Head and gosquared added in the Body of pages.

thanks again

Just tested a new PageSafe stack on the page with only some text in a stack below. Appears to be logging in and then returns to lock icon as before?

So sorry. Not sure how much more time I can spend trying to get this working. Do you do refunds? Not saying it is an issue with your stack but I just can’t use it.

@StephenBishopArtist Okay … so what happens if you take OUT the Google Analytics and the GoSquared code/snippet on the page with PageSafe?

I’ve also heard this advice from someone: “check that his host has Sessions enabled in his PHP settings”. To be fair I have no idea what this really means … but I have definitely seen users on this forum who have less-than-good hosting services … and that was the cause of their problems. So at the very least it’s worth asking your hosting company about this.

1 Like

Hello, not sure how I would take this out of just that page. It is used in the Code section on the left hand RW panel and as I understand is added to all pages. A bit beyond my knowledge level. Does anyone know if this is possible or advisable?
thanks

PHP sessions are enabled.

Remove them from the general code section (temporarily) and republish The single page.

I know a lot of people are using PageSafe with foundry without any issues. And i’d bet there are folks using Google Analytics, as well. Don’t know about GoSquare.

What you are trying to do is a process of elimination and find out what is causing the conflict.

Make the page as straightforward as possible.

I’d like to see the phpinfo() on the site. I’m guessing that there is something configured in the PHP setup.

Hi there, thanks for the tips I will try that with the code.

When you say you would like to see the phpinfo() on the site; how would I get that? Is this on my pages in RW which use index.php instead of index.html set up or do you mean ask my host?

thanks

Here’s how I’d do a PHP info page:

  1. set up a new page (HTML would work, or a stacks page with an HTML stack)
  1. Name the page index.php and give it a folder name of something like test
  2. Mark it to not be in navigation, and I’d mark it not to be indexed.
  3. Add the following code and publish the page

<?php
phpinfo();
?>

Once that page has been published, you should post a link here(e.g. http://www.stephenbishop.co.uk/test) that will help us and @joew see what might be causing the problem.

1 Like