PHP calls in anchors breaking preview

I do not expect RealMac support response to this email. I am posting here as community info and backup to support email which I will be sending today. Realmac… My detail will be provided in the email sent to support.

As info… for me, calls to PHP script in anchors is breaking Preview. I have some LinkLok URL anchors for file downloads which Preview fine and work fine in RW5 and RW6 but not RW7. A page with a “php” anchor does not display (Preview) an accurate representation of Theme settings. (In my case, no Banner, no sidebar, wrong colors.) If I remove the php call in the anchor, Preview works fine.

It is only Preview that breaks. The uploaded page looks and works fine.

I would post example code here but I can’t seem to find how to post code on the forums.

Thank you for reading…

-edit- appears to be Stacks3 related (see below)… I am first contacting YourHead support.

ADDENDUM…
This appears to perhaps be STACKS related as when I put same code on a “Styled Text” page it Previews fine.
I will be contacting YourHead support.

This is a known issue with RW7. Several of us have complained about the lack of ability to preview a page if any PHP code is used. RM have said they’ll look into this and hopefully bring back the ability to preview. The inability to preview PHP is not a bug per se, but apparently was a intended “feature” of RW7.

I’m hoping we’ll be able to preview pages in 7.1 that contain some PHP code (I use Sitelok).

I use PHP includes on most every page and they preview fine. Understand, I don’t expect the php to render. But in this case, the php in the anchor totally “breaks” preview seemingly.

Oddly… I put the link by itself on a Styled Text page and Preview rendered fine (without the php includes of course). I then made a new page with a single Stacks code element, placed the link in it, and again, Preview worked fine. (Again, not showing the php render, but I don’t expect it to.) I am just expecting the entire preview render not to be broken. But on my existing pages it breaks in Preview until I remove the php. So I’m still trying to figure it out…

Hello. Any word on this? Did you get in touch with yourhead?

I’m wondering why now preview is rendering for the site I’m building:
http://lindafriesart.com
and think I may have your same issue.

Thank you,
Dan

well it works here! but not in emails…

Hi Dan and welcome to the forum,

You are replying to a 4 year old post, and I think you are talking about a different issue.

I think the question you are asking is about site previews and emails maybe? You might get better responses on a new post.

Anyway, you see here that the forum software actually generates the site preview. It get’s this information from the websites meta-data. If I put a link in-line like https://lindafriesart.com/, there is no preview. If I place the link on a line by itself (after a blank line):

https://lindafriesart.com/

You get the preview shown, that’s if the metadata is on the site.

I’m unaware of email clients that will do that for you. If you are building advertising emails and a “graphic preview” is important to you, you need to build that yourself.

Do you have my Sitelok stacks? (Maybe since you use LinkLok). In there is a stack called CodeLok. This allows you to define PHP to be ran in preview and publish. Then means that in preview, you could add some code that would make this work. Or only place code into publish so that it will only work when published.