0
votes

On my page's Metadata > Title I have the following macro:

{% if(CurrentDocument.ClassName == "kff.LatestNews"){Title}else{"Latest News"} #%}

This work until i sync to my prod server. I can see the macro, but to get it to work, i have to remove, save, publish, replace, save publish. I've ran the macro signatures, but how can i avoid this? Is it a macro signature issues, and them being different across instances?

2

2 Answers

6
votes

This means you are not using same macro hash salt on both of your servers, so the signature from staging server doesn't match the one on production:

https://docs.kentico.com/k9/macro-expressions/troubleshooting-macros/working-with-macro-signatures#Workingwithmacrosignatures-Configuringthehashsaltformacrosignatures

1
votes

It could also be the fact that the user who signed macro doesn't have the privilege to run on the production server.

In this case you could also think of this. Go to System -> macros -> Signatures

and reassign the macros with this user who has ability to sign macros.

However, Jan's approach is a better way.