通过 BroadLeaf 管理站点添加了类别,但无法在站点中查看

Posted

技术标签:

【中文标题】通过 BroadLeaf 管理站点添加了类别,但无法在站点中查看【英文标题】:Added the category via BroadLeaf admin site but unable to view in site 【发布时间】:2018-06-09 01:06:21 【问题描述】:

使用 Broadleaf 5.2.1-GA 版[许可],请帮助我通过管理站点添加类别。 错误发生在站点站点模块上。

站点应用程序发生错误。

错误原因

2017-12-28 18:45:00.638 错误 2804 --- [nio-8443-exec-2] org.thymeleaf.TemplateEngine : [THYMELEAF][https-jsse-nio-8443-exec-2] 异常处理模板 “目录/类别”:模板解析期间发生错误 (模板:“类路径资源 [themes/default-theme/templates/catalog/category.html]")

org.thymeleaf.exceptions.TemplateInputException:发生错误 在模板解析期间(模板:“类路径资源 [主题/默认主题/模板/目录/category.html]”)在 org.thymeleaf.templateparser.markup.AbstractMarkupTemplateParser.parse(AbstractMarkupTemplateParser.java:241) 在 org.thymeleaf.templateparser.markup.AbstractMarkupTemplateParser.parseStandalone(AbstractMarkupTemplateParser.java:100) 在 org.thymeleaf.engine.TemplateManager.parseAndProcess(TemplateManager.java:666) 在 org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1098) 在 org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1072) 在 org.thymeleaf.spring4.view.ThymeleafView.renderFragment(ThymeleafView.java:353) 在 org.thymeleaf.spring4.view.ThymeleafView.render(ThymeleafView.java:191) 在 org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1286) 在 org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1041) 在 org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:984) 在 org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901) 在 org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) 在 org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861) 在 javax.servlet.http.HttpServlet.service(HttpServlet.java:635) 在 org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) 在 javax.servlet.http.HttpServlet.service(HttpServlet.java:742) 在 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) 在 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 在 org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) 在 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) 在 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 在 com.broadleafcommerce.advancedoffer.site.web.filter.OfferCodeResolutionFilter.doFilterInternalUnlessIgnored(OfferCodeResolutionFilter.java:63) 在 org.broadleafcommerce.common.web.filter.AbstractIgnorableOncePerRequestFilter.doFilterInternal(AbstractIgnorableOncePerRequestFilter.java:58) 在 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 在 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) 在 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 在 org.broadleafcommerce.common.web.filter.TranslationFilter.doFilterUnlessIgnored(TranslationFilter.java:53) 在 org.broadleafcommerce.common.web.filter.AbstractIgnorableFilter.doFilter(AbstractIgnorableFilter.java:60) 在 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) 在 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 在 org.broadleafcommerce.core.web.geolocation.GeolocationFilter.doFilterInternalUnlessIgnored(GeolocationFilter.java:48) 在 org.broadleafcommerce.common.web.filter.AbstractIgnorableOncePerRequestFilter.doFilterInternal(AbstractIgnorableOncePerRequestFilter.java:58) 在 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 在 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) 在 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 在 org.broadleafcommerce.cms.web.URLHandlerFilter.doFilterInternalUnlessIgnored(URLHandlerFilter.java:101) 在 org.broadleafcommerce.common.web.filter.AbstractIgnorableOncePerRequestFilter.doFilterInternal(AbstractIgnorableOncePerRequestFilter.java:58) 在 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 在 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) 在 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 在 org.broadleafcommerce.core.web.order.security.CartStateFilter.doFilterInternalUnlessIgnored(CartStateFilter.java:91) 在 org.broadleafcommerce.common.web.filter.AbstractIgnorableOncePerRequestFilter.doFilterInternal(AbstractIgnorableOncePerRequestFilter.java:58) 在 com.broadleafcommerce.enterprise.workflow.site.web.PreviewCartStateFilter.doFilterInternal(PreviewCartStateFilter.java:58) 在 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 在 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) 在 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 在 com.broadleafcommerce.pricelist.web.PriceListRequestFilter.doFilterInternalUnlessIgnored(PriceListRequestFilter.java:59) 在 org.broadleafcommerce.common.web.filter.AbstractIgnorableOncePerRequestFilter.doFilterInternal(AbstractIgnorableOncePerRequestFilter.java:58) 在 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 在 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) 在 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 在 com.broadleafcommerce.account.site.web.AccountRequestFilter.doFilterInternalUnlessIgnored(AccountRequestFilter.java:63) 在 org.broadleafcommerce.common.web.filter.AbstractIgnorableOncePerRequestFilter.doFilterInternal(AbstractIgnorableOncePerRequestFilter.java:58) 在 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 在 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) 在 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 在 org.broadleafcommerce.profile.web.site.security.CustomerStateFilter.doFilterInternalUnlessIgnored(CustomerStateFilter.java:60) 在 org.broadleafcommerce.common.web.filter.AbstractIgnorableOncePerRequestFilter.doFilterInternal(AbstractIgnorableOncePerRequestFilter.java:58) 在 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 在 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) 在 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 在 org.broadleafcommerce.core.web.device.BroadleafDeviceResolverRequestFilter.doFilterInternal(BroadleafDeviceResolverRequestFilter.java:67) 在 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 在 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) 在 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 在 org.broadleafcommerce.common.web.BroadleafRequestFilter.doFilterInternalUnlessIgnored(BroadleafRequestFilter.java:110) 在 org.broadleafcommerce.common.web.filter.AbstractIgnorableOncePerRequestFilter.doFilterInternal(AbstractIgnorableOncePerRequestFilter.java:58) 在 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 在 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) 在 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 在 org.springframework.web.servlet.resource.ResourceUrlEncodingFilter.doFilter(ResourceUrlEncodingFilter.java:59) 在 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) 在 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 在 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317) 在 org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127) 在 org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91) 在 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) 在 org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114) 在 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) 在 org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137) 在 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) 在 org.broadleafcommerce.profile.web.site.security.SessionFixationProtectionFilter.doFilter(SessionFixationProtectionFilter.java:105) 在 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) 在 org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111) 在 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) 在 org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170) 在 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) 在 org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63) 在 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) 在 org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200) 在 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) 在 org.broadleafcommerce.common.security.handler.SecurityFilter.doFilter(SecurityFilter.java:107) 在 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) 在 org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116) 在 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) 在 org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64) 在 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 在 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) 在 org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105) 在 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) 在 org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56) 在 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 在 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) 在 org.springframework.security.web.access.channel.ChannelProcessingFilter.doFilter(ChannelProcessingFilter.java:157) 在 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) 在 org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214) 在 org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177) 在 org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) 在 org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262) 在 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) 在 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 在 org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) 在 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 在 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) 在 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 在 org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:105) 在 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 在 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) 在 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 在 org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81) 在 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 在 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) 在 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 在 org.broadleafcommerce.common.web.BroadleafRequestFilter.doFilterInternalUnlessIgnored(BroadleafRequestFilter.java:110) 在 org.broadleafcommerce.common.web.filter.AbstractIgnorableOncePerRequestFilter.doFilterInternal(AbstractIgnorableOncePerRequestFilter.java:58) 在 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 在 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) 在 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 在 org.broadleafcommerce.site.common.web.filter.EstablishSessionFilter.doFilterUnlessIgnored(EstablishSessionFilter.java:45) 在 org.broadleafcommerce.common.web.filter.AbstractIgnorableFilter.doFilter(AbstractIgnorableFilter.java:60) 在 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) 在 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 在 org.broadleafcommerce.common.web.BroadleafRequestFilter.doFilterInternalUnlessIgnored(BroadleafRequestFilter.java:82) 在 org.broadleafcommerce.common.web.filter.AbstractIgnorableOncePerRequestFilter.doFilterInternal(AbstractIgnorableOncePerRequestFilter.java:58) 在 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 在 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) 在 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 在 org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:178) 在 org.broadleafcommerce.common.web.filter.IgnorableOpenEntityManagerInViewFilter.doFilterInternal(IgnorableOpenEntityManagerInViewFilter.java:54) 在 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 在 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) 在 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 在 org.broadleafcommerce.common.web.filter.SecurityBasedIgnoreFilter.doFilter(SecurityBasedIgnoreFilter.java:77) 在 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) 在 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 在 org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) 在 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 在 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) 在 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 在 org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) 在 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 在 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) 在 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 在 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) 在 org.apache.catalina.core.StandardContextValve.__invoke(StandardContextValve.java:96) 在 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java) 在 org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478) 在 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) 在 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80) 在 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) 在 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) 在 org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799) 在 org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) 在 org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) 在 org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455) 在 org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) 在 java.util.concurrent.ThreadPoolExecutor.runWorker(未知来源) 在 java.util.concurrent.ThreadPoolExecutor$Worker.run(未知来源) 在 org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) 在 java.lang.Thread.run(Unknown Source) 引起: org.attoparser.ParseException:评估 SpringEL 的异常 表达式:“#seo.getCategoryTitlePattern()”(模板: “目录/类别” - 第 4 行,第 16 列)在 org.attoparser.MarkupParser.parseDocument(MarkupParser.java:393) 在 org.attoparser.MarkupParser.parse(MarkupParser.java:257) 在 org.thymeleaf.templateparser.markup.AbstractMarkupTemplateParser.parse(AbstractMarkupTemplateParser.java:230) ...省略了169个常见框架原因: org.thymeleaf.exceptions.TemplateProcessingException:异常 评估 SpringEL 表达式:“#seo.getCategoryTitlePattern()” (模板:“目录/类别” - 第 4 行,第 16 列) org.thymeleaf.spring4.expression.SPELVariableExpressionEvaluator.evaluate(SPELVariableExpressionEvaluator.java:290) 在 org.thymeleaf.standard.expression.VariableExpression.executeVariableExpression(VariableExpression.java:165) 在 org.thymeleaf.standard.expression.SimpleExpression.executeSimple(SimpleExpression.java:66) 在 org.thymeleaf.standard.expression.Expression.execute(Expression.java:109) 在 org.thymeleaf.standard.expression.Expression.execute(Expression.java:138) 在 org.thymeleaf.standard.expression.StandardExpressionPreprocessor.preprocess(StandardExpressionPreprocessor.java:91) 在 org.thymeleaf.standard.expression.StandardExpressionParser.parseExpression(StandardExpressionParser.java:120) 在 org.thymeleaf.standard.expression.StandardExpressionParser.parseExpression(StandardExpressionParser.java:62) 在 org.thymeleaf.standard.expression.StandardExpressionParser.parseExpression(StandardExpressionParser.java:44) 在 org.thymeleaf.standard.processor.StandardUtextTagProcessor.doProcess(StandardUtextTagProcessor.java:71) 在 org.thymeleaf.processor.element.AbstractAttributeTagProcessor.doProcess(AbstractAttributeTagProcessor.java:74) 在 org.thymeleaf.processor.element.AbstractElementTagProcessor.process(AbstractElementTagProcessor.java:95) 在 org.thymeleaf.util.ProcessorConfigurationUtils$ElementTagProcessorWrapper.process(ProcessorConfigurationUtils.java:633) 在 org.thymeleaf.engine.ProcessorTemplateHandler.handleOpenElement(ProcessorTemplateHandler.java:1314) 在 org.thymeleaf.engine.OpenElementTag.beHandled(OpenElementTag.java:205) 在 org.thymeleaf.engine.Model.process(Model.java:282) 在 org.thymeleaf.engine.ProcessorTemplateHandler.handleOpenElement(ProcessorTemplateHandler.java:1587) 在 org.thymeleaf.engine.OpenElementTag.beHandled(OpenElementTag.java:205) 在 org.thymeleaf.engine.Model.process(Model.java:282) 在 org.thymeleaf.engine.ProcessorTemplateHandler.handleOpenElement(ProcessorTemplateHandler.java:1587) 在 org.thymeleaf.engine.OpenElementTag.beHandled(OpenElementTag.java:205) 在 org.thymeleaf.engine.Model.process(Model.java:282) 在 org.thymeleaf.engine.Model.process(Model.java:290) 在 org.thymeleaf.engine.GatheringModelProcessable.process(GatheringModelProcessable.java:78) 在 org.thymeleaf.engine.ProcessorTemplateHandler.handleCloseElement(ProcessorTemplateHandler.java:1640) 在 org.thymeleaf.engine.TemplateHandlerAdapterMarkupHandler.handleCloseElementEnd(TemplateHandlerAdapterMarkupHandler.java:388) 在 org.thymeleaf.templateparser.markup.InlinedOutputExpressionMarkupHandler$InlineMarkupAdapterPreProcessorHandler.handleCloseElementEnd(InlinedOutputExpressionMarkupHandler.java:322) 在 org.thymeleaf.standard.inline.OutputExpressionInlinePreProcessorHandler.handleCloseElementEnd(OutputExpressionInlinePreProcessorHandler.java:220) 在 org.thymeleaf.templateparser.markup.InlinedOutputExpressionMarkupHandler.handleCloseElementEnd(InlinedOutputExpressionMarkupHandler.java:164) 在 org.attoparser.HtmlElement.handleCloseElementEnd(HtmlElement.java:169) 在 org.attoparser.HtmlMarkupHandler.handleCloseElementEnd(HtmlMarkupHandler.java:412) 在 org.attoparser.MarkupEventProcessorHandler.handleCloseElementEnd(MarkupEventProcessorHandler.java:473) 在 org.attoparser.ParsingElementMarkupUtil.parseCloseElement(ParsingElementMarkupUtil.java:201) 在 org.attoparser.MarkupParser.parseBuffer(MarkupParser.java:725) 在 org.attoparser.MarkupParser.parseDocument(MarkupParser.java:301) ... 171个常用帧省略原因: org.springframework.expression.spel.SpelEvaluationException:EL1004E: 方法调用:找不到方法 getCategoryTitlePattern() org.broadleafcommerce.core.web.expression.SeoVariableExpression 类型 在 org.springframework.expression.spel.ast.MethodReference.findAccessorForMethod(MethodReference.java:211) 在 org.springframework.expression.spel.ast.MethodReference.getValueInternal(MethodReference.java:125) 在 org.springframework.expression.spel.ast.MethodReference.access$000(MethodReference.java:49) 在 org.springframework.expression.spel.ast.MethodReference$MethodValueRef.getValue(MethodReference.java:347) 在 org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:88) 在 org.springframework.expression.spel.ast.SpelNodeImpl.getValue(SpelNodeImpl.java:120) 在 org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:324) 在 org.thymeleaf.spring4.expression.SPELVariableExpressionEvaluator.evaluate(SPELVariableExpressionEvaluator.java:263) ... 省略了 205 个常用帧

【问题讨论】:

创建分类时出错还是只在分类视图中出错? 分类创建正常,但分类视图出现错误,如果需要更多详细信息,请帮助告诉我。 【参考方案1】:

看起来错误是变量表达式方法#seo.getCategoryTitlePattern()不再存在。如果您查看SeoVariableExpression,正确的方法是使用#seo.getMetaProperties(category).get('title')。更好的选择是在通用 seoMetaProperties.html 模板中执行类似的操作来呈现页面的任何元属性:

<th:block th:each="metaProperty : $metaProperties" th:with="key=$metaProperty.key, value=$metaProperty.value">
    <th:block th:if="$value != null">
        <title th:if="$key == 'title' and $#strings.contains(value,'#seoElement')" th:utext="$__$value__"></title>
        <title th:if="$key == 'title' and not $#strings.contains(value,'#seoElement')" th:utext="$value"></title>

        <link th:if="$key == 'canonicalUrl'" rel="canonical" th:attr="href=$value"/>

        <meta th:if="$key == 'metaDescription' and $#strings.contains(value,'#seoElement')" name="description" th:attr="content=$__$value__"/>
        <meta th:if="$key == 'metaDescription' and not $#strings.contains(value,'#seoElement')" name="description" th:attr="content=$value"/>

        <th:block th:if="$#strings.startsWith(key, 'og:')">
            <meta th:if="$#strings.contains(value,'#seoElement')" th:attr="property=$key, content=$__$value__"/>
            <meta th:unless="$#strings.contains(value,'#seoElement')" th:attr="property=$key, content=$value"/>
        </th:block>

        <th:block th:if="$#strings.startsWith(key, 'twitter:')">
            <meta th:if="$#strings.contains(value,'#seoElement')" th:attr="name=$key, content=$__$value__"/>
            <meta th:unless="$#strings.contains(value,'#seoElement')" th:attr="name=$key, content=$value"/>
        </th:block>
    </th:block>
</th:block>

这可以包含在您的category.html 文件中,如下所示:

<th:block th:include="seo/partials/seoMetaProperties" th:with="metaProperties=$#seo.getMetaProperties(category)" />

【讨论】:

以上是关于通过 BroadLeaf 管理站点添加了类别,但无法在站点中查看的主要内容,如果未能解决你的问题,请参考以下文章

Broadleaf Jboss设置ClassNoFound

电商小程序实战教程-类别管理

电商小程序实战教程-类别管理

阔叶商业演示网站登录链接被重定向

如何管理 SharePoint 现代网站中的类别

Broadleaf电商平台上传图片出现NullPointerException