Just a quick note to let you guys know that we’re looking into an issue where an “Unable to open External Preview” alert is shown, after exporting a page with a PHP extension. This is due to a change in OS X, and we’re investigating. Right now, the only workaround I can suggest would be to disable this option in RapidWeaver’s preferences.
I’ll keep you guys in the loop as our investigation progresses. We’re currently investigating this as part of our work on 6.3.1, but this is subject to change depending on the scope / nature of the bug.
Does that include the ability to preview PHP without having it look for includes that are only available on the server?
My pages have a require() directive that only works on the server. RW6 simply ignores those in the preview as well as any calls to PHP functions in the code. Under RW7 all my numerous sites completely fail with PHP errors.
Is there a workaround? Will there be a fix to restore the functionality that used to work fine until RW6?
RW7 has an advanced PHP preview server in place.
I don’t think there will be a function available to turn of that feature.
Aren’t you able to include your “external” PHP files into RW7 resource area?
Unfortunately that’s not possible. The includes are in a very specific location and I can’t have them in the same location on the local system. It’s pretty annoying that RW7 tried to improve things but in turn broke all my site previews. I won’t be able to use it this way.
Thanks, but that doesn’t really help (I know my way around php quite well) - the php include contains functions that are being used throughout the pages - so even if I do this kind of conditional include of the file (which I have solved by now), that will still not solve all the php errors I’m getting because of the functions used in the page not being declared.
If this is a Stacks page, all I could do is a Stack, which will provide you a container, which will not display in Preview mode, but only in Publish.
In that container, you could put a HTML Stack, and put your PHP code inside.
A stack that hides its contents in preview mode would be one solution. But honestly I’d rather have RW7 to allow for disabling PHP in preview so I wouldn’t have to work around their new system on a few hundred pages.
I agree. Jannis’s proposed solution is a good workaround but RM should sort this out. I never understood why RW needs to preview when you Publish or Export anyway. Export should just export and do nothing else.