Comments (12)
@johngcn 已经不会出现空白页面的问题了,非常感谢
from gf.
@StarOfLife 你好,请问你的 系统版本、系统架构、Go版本、框架版本,分别是什么?
from gf.
go version go1.11 windows/amd64
windows7 x64
框架版本v1.4.6
from gf.
@StarOfLife 好的,收到,我看看
from gf.
@StarOfLife 确认一下,出现空白页面的时候终端或者错误日志文件中是否有报错信息?例如:cannot find template file xxx
之类的?
from gf.
@johngcn 没有错误信息,我发现两个
from gf.
@StarOfLife 听你的描述似乎和模板内容解析有一定关系,你是用的哪个方法解析模板?
from gf.
用的是这种方式
content, _ := gins.View().Parse("login.html", map[string]interface{}{
"title": "登录",
"publicKey": publicKey,
})
c.Response.Writeln(content)
from gf.
@StarOfLife 这种方式的话屏蔽了返回的错误信息,模板解析也有可能因为什么原因失败了,你改成c.Response.WriteTpl("login.html", map..,)
这种方式试试,如果模板解析出错,会直接展示在页面上,便于定位问题。如果问题复现但是仍然找不到任何的错误输出,你@我。
from gf.
改成c.Response.WriteTpl("login.html", map..,)这种方式之后,模版页面当中多次添加删除元素,再次白屏,依旧没有错误输出。出现白屏时,模版当中处于下面结构,之后随意删除增加又能够重新渲染出来页面
<input type="hidden" value="${.publicKey}" id="publicKey">
<div>${.title}</div>
<input type="hidden" value="${.publicKey}" id="publicKey">
<input type="hidden" value="${.publicKey}" id="publicKey">
<input type="hidden" value="${.publicKey}" id="publicKey">
from gf.
@StarOfLife 感谢反馈,那可能不是模板解析的问题,有可能是模板缓存造成的,我修复了一个版本,已提交,更新代码再试试。如果使用了go modules
,由于本次的tagv1.4.6
没有发生改变,你需要删除本地的缓存后再更新。查看version.go
文件,如果版本号为v1.4.6.1
则更新成功。如果还有问题,你@我。
from gf.
好的,非常感谢,祝新年快乐
from gf.
Related Issues (20)
- [v2.7.0] gconv.Struct is not compatible with previous versions HOT 1
- Some ideas on improving the Scan method of orm HOT 5
- contrib/sdk/httpclient: Support extended response handler
- os/gtime:I suggest adding a few additional flags to the GTCP protocol header
- [v2.5.2]Investigating Blocking Issues with GoFrame 2.5 During POST Requests to Third-Party APIs
- cmd/gf: pbentity gen fail in monoRepo
- Suggestions on how to process files after gf gen dao in database tables, it has been tested and feasible
- gvalid slice enums verification failed : no pkg path found for type "[]t.Status"
- database/gdb: Inconsistency in the err returned when no data is queried during the query
- database/gdb: When (update/insert) operation, if the number of fields in the data table is 0, an error will be returned directly HOT 1
- I encountered this error when using websocket, and I want to know how to solve it. HOT 2
- os/gtime: There is a bug in converting string to gtime.Time HOT 3
- V2.7 cannot use ORM JSON storage HOT 2
- JetBrains OpenSourced Licenses - 2024 HOT 8
- cmd/gf: gen enums fail
- g.Dump: An error occurred during type serialization of json.MarshalJSON
- gf gen enums error report HOT 1
- gogf/gf: gen ctrl will also generate interface methods for the commented req&res HOT 1
- database/gdb: scan zero value for google.protobuf.Timestamp HOT 2
- db/gdb query table, field to cache
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gf.