掲示板
[Mobile Device Detection] Execute a rule multiple times on public pages
11年前 に Frank Walter によって更新されました。
[Mobile Device Detection] Execute a rule multiple times on public pages
New Member 投稿: 5 参加年月日: 09/09/04 最新の投稿
Hello,
i created a hook to add my own mobile device detection rule and action. I configured a page to use them and so far everything works great when i am logged in. Every time i refresh the page the rule and the action are getting executed.
But if i access the page as a guest user, they only get executed once and if i refresh the page or click on another page and return they are being ignored.
I am reading some cookie information in the action to change things depending on the values there. So i need it to get them executed every time.
Does anybody know if there is a configuration for this behavior? If not could you tell me what i have to modify to get it work like in the case when a user is logged in?
Thanks!
i created a hook to add my own mobile device detection rule and action. I configured a page to use them and so far everything works great when i am logged in. Every time i refresh the page the rule and the action are getting executed.
But if i access the page as a guest user, they only get executed once and if i refresh the page or click on another page and return they are being ignored.
I am reading some cookie information in the action to change things depending on the values there. So i need it to get them executed every time.
Does anybody know if there is a configuration for this behavior? If not could you tell me what i have to modify to get it work like in the case when a user is logged in?
Thanks!
11年前 に Frank Walter によって更新されました。
RE: [Mobile Device Detection] Execute a rule multiple times on public pages
New Member 投稿: 5 参加年月日: 09/09/04 最新の投稿
So the problem was the com.liferay.portal.servlet.filters.cache.CacheFilter.
It checks if a user is logged in or if there are any portlets on the page that don't have the <layout-cacheable>true</layout-cacheable> attribute configured in liferay-portlet.xml.
My public pages didn't have any portlets so i attached one on every page and now it works.
It checks if a user is logged in or if there are any portlets on the page that don't have the <layout-cacheable>true</layout-cacheable> attribute configured in liferay-portlet.xml.
My public pages didn't have any portlets so i attached one on every page and now it works.
11年前 に Juan Gonzalez P によって更新されました。
RE: [Mobile Device Detection] Execute a rule multiple times on public pages
Liferay Legend 投稿: 3089 参加年月日: 08/10/28 最新の投稿
Hi Frank,
Thanks for sharing the solution, but, what do you mean by "attach one on every page"?
Thanks again!
Thanks for sharing the solution, but, what do you mean by "attach one on every page"?
Thanks again!
11年前 に Frank Walter によって更新されました。
RE: [Mobile Device Detection] Execute a rule multiple times on public pages
New Member 投稿: 5 参加年月日: 09/09/04 最新の投稿
Just add it to a page (into a layout template column).
The CacheFilter iterates through the first 10 columns so i think it wouldnt work if you would integrate a portlet directly into a template.
The CacheFilter iterates through the first 10 columns so i think it wouldnt work if you would integrate a portlet directly into a template.