留言板

Removing "Oops it looks like this is taking longer than expected" message

thumbnail
Manish Kumar Jaiswal,修改在6 年前。

Removing "Oops it looks like this is taking longer than expected" message

Regular Member 帖子: 153 加入日期: 08-11-25 最近的帖子
Hi Friends ,

Can you suggest me how can i remove the default message "Oops it looks like this is taking longer than expected " in Liferay Portal . I dont want to show the message at all in my portal . Is there any configuration for this ?

Thanks in advance
Manish
Jenny Chen,修改在6 年前。

RE: Removing "Oops it looks like this is taking longer than expected" mess

New Member 帖子: 8 加入日期: 10-9-20 最近的帖子
It depends on your Liferay version...
- For 6.2 and below, you would have to EXT/Hook and look for all language keys in Java/JSPs referencing the message and override those files.
- For 7.0, I don't think it's part of the core JSPs so you'd have to find which modules you would need to override.

If you're trying to change the default message to something else rather than removing it completely.
- For 6.2 and below, you can create a hook and override Language.properties (you may need to make sure all the other localized Language.properties are updated as well) with your own message.
- For 7.0, you would most likely need to do the same as what has been mentioned above.
thumbnail
Jorge Díaz,修改在6 年前。

RE: Removing "Oops it looks like this is taking longer than expected" mess

Liferay Master 帖子: 753 加入日期: 14-1-9 最近的帖子
That messages are displayed by Single Page Application functionality in case server don't answer in a specific time.
You can increase configured timeouts or disable SPA, more info see: https://dev.liferay.com/es/develop/tutorials/-/knowledge_base/7-0/automatic-single-page-applications#customizing-spa-settings
thumbnail
Manish Kumar Jaiswal,修改在6 年前。

RE: Removing "Oops it looks like this is taking longer than expected" mess

Regular Member 帖子: 153 加入日期: 08-11-25 最近的帖子
Thanks for your replies ,

I am now trying to overwrite this message , for that I have written my custom module to overwrite SPA , but still I am unable to give my custom message . Can you please give your suggestions on this . Here is my code

import com.liferay.portal.kernel.util.AggregateResourceBundleLoader;
import com.liferay.portal.kernel.util.CacheResourceBundleLoader;
import com.liferay.portal.kernel.util.ClassResourceBundleLoader;
import com.liferay.portal.kernel.util.ResourceBundleLoader;

import java.util.ResourceBundle;



import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;

@Component(
		immediate = true,
		property = {
			"bundle.symbolic.name=com.liferay.frontend.js.spa.web",			
			"resource.bundle.base=content.Language",
			"servlet.context.name=frontend-js-spa-web-1.0.7"
		}		
	)
public class SPALanguageHook implements ResourceBundleLoader
{
	
	  @Override
      public ResourceBundle loadResourceBundle(String languageId) {
          return bundle.loadResourceBundle(languageId);
      }
	  
	  private AggregateResourceBundleLoader bundle;
	  
	   @Reference(target = "(bundle.symbolic.name=com.liferay.frontend.js.spa.web)")
       public void setResourceBundleLoader(ResourceBundleLoader resourceBundleLoader) {
           bundle = new AggregateResourceBundleLoader(new CacheResourceBundleLoader(new ClassResourceBundleLoader
        		   ("content.Language",SPALanguageHook.class.getClassLoader())),resourceBundleLoader);
       }

      

   }
	


and in Language.properties
it-looks-like-this-is-taking-longer-than-expected=Please Wait ....


FYI: I am using Liferay DXP.

Thanks in advance for your help
thumbnail
Manish Kumar Jaiswal,修改在6 年前。

RE: Removing "Oops it looks like this is taking longer than expected" mess

Regular Member 帖子: 153 加入日期: 08-11-25 最近的帖子
Any Suggestion friends on this code !! I checked this code changing just the module properties on blogs and this works there .So why does n't this work here ? any ideas would be helpful .

Thanks in advance
Manish