1

使用生成的 jsp 文件,看起来小部件的getCodeInserters()方法没有被调用。jsp 中缺少小部件的帮助程序初始化、页面导入、内联 css/js。小部件的 renderForJSP() 方法是根据下面的日志调用的。

这个小部件是区域的一部分,同样的事情发生在区域中的所有小部件上。使用该区域的所有页面都会抛出与以下相同的错误。

没有小部件或设计师更改被推送到生产中。该区域的所有子小部件在页面生成期间都没有数据库依赖性。

问题发生在特定构建上,但下一个构建会生成正确的 jsp。

    ...
    An error occurred at line: 1,487 in the jsp __file: /navpoint/xx-home.jsp
    productionHelper_xall_layouts_headers_and_footers_headerxx2_405 cannot be resolved to a variable

    ....
    1484: <td ><%-- Widget mall.layouts.headers.and.footers.headerxx2@405 (type=xx.eyyyyyrce.feedbackform.zzztrollzz.FeedbackFormWidgetController) --%>  
    1485: <%  
    1486: try {  
    1487: WbdProductionHelper helper = productionHelper_mall_layouts_headers_and_footers_headerxx2_405;  
    1488: String snippetVar_defaultImagePath = "/mall/widgetti/images/widget/xxfeedbackform";  
    1489: String snippetVar_selfNavpoint = "xx-home";  
    1490: String snippetVar_selfNavpointUrl = "/home";  
    ...  
4

1 回答 1

1

Does this effect every page, or just some pages?

The code that asks widgets to generate code has barely changed in five years, and has generated consistent and predictable code many millions of times without problem, so I suspect the cause of this problem lies elsewhere. My guess would be one of the following:

  1. The webdesign has changed, or perhaps switched to a different branch, OR

  2. One of your widgets is somehow corrupting the generation process, OR

  3. The system configuration (wbd.conf?) has been changed between the two generation runs you mention.

Are you building using the ToolTwist Controller, or some other method? If you are using the Controller check that the versions of your extension projects are nailed down to specific branches, and preferably a specific Git tag. If you are using Maven or some other home grown build process then check the versions and commit times in your repo logs. You might find something changed between the two generate runs.

If the problem only effects certain pages, then that is also a good starting point. Look for a widget that only exists on those pages with problems, and see if it has changed or if it's code has a dependency on any sort of external factor.

If you can reproduce the error it should be easy to track down the cause. If you can't reproduce the error then I think you need to consider whether someone has changed something either accidentally or quietly. I don't believe it likely that everything remained the same, but the generation process produced a different result.

于 2014-09-12T06:52:34.500 回答