HTTP 500 error: I don't know how to fix

It seems out of the blue I’m now getting an HTTP 500 error on this page:
https://mathewusf.com/storylab2018/preview/

I have no idea what’s causing this. I’ve read a bit on the web, but nothing seems to be particular helpful. Is there anyone around who can possibly troubleshoot this?

I’m not getting anything on that page, not even an error when I visit in Safari. I do get an error message when I visit in Chrome – the same Error 500 you are getting. That being said, it is a very general error, which basically means something went awry on the server, but there’s no real details. This is something you’ll probably want to contact your host about.

Okay I have a bit more info. On the error-log for that page it states:

[29-Nov-2017 15:59:29 UTC] PHP Parse error: syntax error, unexpected ‘%’ in /home/mathewus/public_html/storylab2018/preview2/index.php on line 1771

That line turned out to be where I had placed a Form Pro stack for Foundry. And since everything was working fine yesterday, and I only recently updated to new Potion Pack, is it possible this is a bug in the Form Pro stack? (Yes, I published and saw this problem after updating to Potion Pack.)

For now I’ve removed the Form Pro stack and all works fine.

Okay, and now I’ve heard from my hosting company. They write:


The error_log file in that folder was throwing the following error:

[29-Nov-2017 16:20:43 UTC] PHP Parse error: syntax error, unexpected ‘%’ in /home/mathewus/public_html/storylab2018/preview/index.php on line 1615

I looked at that line and PHP was complaining about this tag:

%[if True]%

It looks like that’s supposed to be used in HTML but not PHP. I just reordered the <?php tags to be inside of the block instead of outside and that seems to have cleared it up. Anytime a 500 error is showing on the site it should always be written to an error_log file in folder that file is being served from which can help with troubleshooting.


Note: this is a different page from the one I looked at. They are actually duplicates but are very slightly different. The line he refers to is also in the area where the Form Plus stack code is showing up.

What version of Stacks are you using. Go have a look here in Edit Mode and post a screenshot of it for me:

Adam: I’m using v 3.5.5 (4120)

2017-11-29_09-57-07

Send me your project file, per normal procedure, and point me to the page and I’ll take a look.

Adam: I just sent to you. Let me know if you need more info.

Before I launch into looking at this project file – Did you have this Form on your page before updating Potion Pack? Just trying to narrow things down.

Yes. It was there before. I had added a page to the project this morning so, of course, all pages were marked as changed. But I did not change the relevant page (the Home page). Once I exported I could not see anything on Safari. Chrome told me it was an HTTP 500 error. And my hosting company sent me the info listed above.

Can you send me this file?

Also, I know it seems like a silly question, but can you double-check what version of Potion Pack is installed?

Unfortunately no. It’s all gone. I had to immediately remove the form. Delete all on server. Republish all. Students are registering for courses now and that one page served as a course “ad”. Once I had it working again (about 30 min ago), then I added the Form back in and it now seems to work. I sent you the project file that existed before the upgrade.

All Potion stacks are listed as 1.20

Sorry for not keeping the old “bad” stuff on the server but I had to develop a quick fix.

So I am clear, because I am currently a bit confused, did the problem occur with v1.2.0 installed or another version? Did installing v1.2.0 fix the problem?

When I export the page I don’t get this errant %[if]% statement. I am using v1.2.0 though to export, so I’m not sure that is what you were doing or not. I suspect it had something to do with the Form Pro stack being present, then updating to v1.2.0, and one of the new features toggles not working properly, but I can’t replicate it to see if that is true or which one in order to fix it, if it is a bug. But if the problem was present before updating to v1.2.0 then that scenario is thrown out the window.

:confused:

Problem was not there before 1.20. When I woke up today 1.20 was available to upgrade. I did. Then about an hour later I made some changes to the project file and exported. That’s the first time I noticed the problem. So I have to assume it had to do with the upgrade process or not sticking after upgrade or toggles (as you mentioned).

So removing and then reinserting the stack fixed the problem? If so it could be what I suspect, but I can’t narrow it down, as it does not export that way for me here, unfortunately.

I believe you are stating it correctly. I removed. Then exported. Only after I was confident that the page was now working correctly (after about an hour) did I then go back in and re-add the form pro stack. Then it finally worked fine.

If you, or anyone else, encounters this with another project file, and can get me a copy of the PHP file with the errant %[if]% statement in it I would love to see it so I can track this down.