主题 : 关于*题模板的使用问题
级别: 总版主
UID: 10736
积分:149790 加为好友
威望: 212 精华: 42
主题:297 回复:127677
注册时间:2010-09-08
在线时长:91.02
11#   发表于:2018-02-09 17:21:59  IP:182.12.*.*
你复制默认可以正常的模板替换这个会提示找不到吗
路漫漫其修远兮,吾将上下而求索!
级别: 解元
UID: 119633
积分:201 加为好友
威望: 0 精华: 0
主题:16 回复:118
注册时间:2018-01-05
在线时长:0
12#   发表于:2018-02-09 17:25:20  IP:112.35.*.*
回复第11楼

嗯,是的,也会提示找不到,topic_zhjyglpt.html这个文件就是我复制topic_default.html过来的,一样提示找不到
级别: 版主
UID: 118616
积分:4114 加为好友
威望: 0 精华: 0
主题:0 回复:3968
注册时间:2017-12-04
在线时长:0
13#   发表于:2018-02-09 17:31:55  IP:182.12.*.*
回复第12楼
还修改了什么吗
级别: 解元
UID: 119633
积分:201 加为好友
威望: 0 精华: 0
主题:16 回复:118
注册时间:2018-01-05
在线时长:0
14#   发表于:2018-02-09 17:40:16  IP:112.35.*.*
回复第13楼

没有其它修改的地方了
级别: 解元
UID: 119633
积分:201 加为好友
威望: 0 精华: 0
主题:16 回复:118
注册时间:2018-01-05
在线时长:0
15#   发表于:2018-02-11 09:44:47  IP:112.35.*.*
回复第11楼

请问,这个有解决办法吗?
我是以源码的方式,部署项目的,是只有我这边才有问题吗?
级别: 总版主
UID: 10736
积分:149790 加为好友
威望: 212 精华: 42
主题:297 回复:127677
注册时间:2010-09-08
在线时长:91.02
16#   发表于:2018-02-11 09:53:57  IP:182.12.*.*
回复第11楼

请问,这个有解决办法吗?
我是以源码的方式,部署项目的,是只有我这边才有问题吗?
这个你要么就用默认名称的专题来做
路漫漫其修远兮,吾将上下而求索!
级别: 解元
UID: 119633
积分:201 加为好友
威望: 0 精华: 0
主题:16 回复:118
注册时间:2018-01-05
在线时长:0
17#   发表于:2018-02-11 09:58:20  IP:112.35.*.*
回复第16楼

默认专题模板是指哪个文件?topic/topic_default.html?
级别: 解元
UID: 119633
积分:201 加为好友
威望: 0 精华: 0
主题:16 回复:118
注册时间:2018-01-05
在线时长:0
18#   发表于:2018-02-11 10:23:17  IP:112.35.*.*
回复第16楼

我又在其它同事的电脑部署了下,还是同样的问题,又做了下面的实验,可以确认,这个是你们后台的bug:

1.新建模板目录,但是没有专题目录topic:


2.前端通过专题标签访问报错(注意红色字体部分):
二月 11, 2018 9:53:02 上午 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet [JeeCmsFront] in context with path [/jeecmsv9f] threw exception
freemarker.template.TemplateNotFoundException: Template not found for name "/WEB-INF/t/cms/www/zhjyglpt/topic/topic_default.html".
The name was interpreted by this TemplateLoader: MultiTemplateLoader(loader1 = FileTemplateLoader(baseDir="F:\gongsi\study\JEECMS\jeecmsv9.2-src\src\main\webapp", canonicalBasePath="F:\gongsi\study\JEECMS\jeecmsv9.2-src\src\main\webapp\"), loader2 = ClassTemplateLoader(resourceLoaderClass=org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer, basePackagePath="" /* relatively to resourceLoaderClass pkg */)).
at freemarker.template.Configuration.getTemplate(Configuration.java:2485)
at freemarker.template.Configuration.getTemplate(Configuration.java:2287)

3.模板目录中,加入专题目录topic(从default目录中copy过来,没有做任何修改)


4.前端通过专题标签可以正常访问

5.在后台专题管理中指定专题模板(不使用默认模板)


6.点击专题后,页面异常,后台报错,如下:


二月 11, 2018 10:20:16 上午 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet [JeeCmsFront] in context with path [/jeecmsv9f] threw exception [Request processing failed; nested exception is org.springframework.context.ApplicationContextException: Could not load FreeMarker template for URL [/zhjyglpt/topic/topic_default.html]; nested exception is freemarker.template.TemplateNotFoundException: Template not found for name "/zhjyglpt/topic/topic_default.html".
The name was interpreted by this TemplateLoader: MultiTemplateLoader(loader1 = FileTemplateLoader(baseDir="F:\gongsi\study\JEECMS\jeecmsv9.2-src\src\main\webapp", canonicalBasePath="F:\gongsi\study\JEECMS\jeecmsv9.2-src\src\main\webapp\"), loader2 = ClassTemplateLoader(resourceLoaderClass=org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer, basePackagePath="" /* relatively to resourceLoaderClass pkg */)).] with root cause
freemarker.template.TemplateNotFoundException: Template not found for name "/zhjyglpt/topic/topic_default.html".
The name was interpreted by this TemplateLoader: MultiTemplateLoader(loader1 = FileTemplateLoader(baseDir="F:\gongsi\study\JEECMS\jeecmsv9.2-src\src\main\webapp", canonicalBasePath="F:\gongsi\study\JEECMS\jeecmsv9.2-src\src\main\webapp\"), loader2 = ClassTemplateLoader(resourceLoaderClass=org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer, basePackagePath="" /* relatively to resourceLoaderClass pkg */)).
at freemarker.template.Configuration.getTemplate(Configuration.java:2485)
at freemarker.template.Configuration.getTemplate(Configuration.java:2287)


7.可以看出上面红色字体的部分,路径不同,指定模板的时候把前面的/WEB-INF/t/cms/www/路径给丢了,后台bug
级别: 总版主
UID: 10736
积分:149790 加为好友
威望: 212 精华: 42
主题:297 回复:127677
注册时间:2010-09-08
在线时长:91.02
19#   发表于:2018-02-11 10:31:36  IP:182.12.*.*
您是v9.2吗?
路漫漫其修远兮,吾将上下而求索!
级别: 解元
UID: 119633
积分:201 加为好友
威望: 0 精华: 0
主题:16 回复:118
注册时间:2018-01-05
在线时长:0
20#   发表于:2018-02-11 10:34:47  IP:112.35.*.*
回复第19楼

是的,9.2版本

bug我已经反馈到【BUG反馈】版块
http://bbs.jeecms.com/bug/64740.jhtml
|< < 1 2 3 > >| 共3页