Fix iframe wrong url bug.

This commit is contained in:
BoHung Chiu 2021-08-18 21:32:23 +08:00
parent 577a845e1f
commit 146909c0c2
1 changed files with 4 additions and 0 deletions

View File

@ -740,6 +740,10 @@ class AnnouncementsController < ApplicationController
else
@categories = params[:categories]
end
begin
params[:url] = Page.first.find_page(:module=>"announcement",:enabled_for=>I18n.locale.to_s).first.url rescue Page.where(:module=>"announcement",:enabled_for=>I18n.locale.to_s).first.url
rescue
end
OrbitHelper.set_site_locale(I18n.locale)
OrbitHelper.set_current_widget_module("announcement")
OrbitHelper.set_params(params,current_user)