随着办公平台的陆续深入使用,通达OA的软肋、不便捷性(移动化方面)、可扩展性(比如搭建子系统和整合应用)日趋明显,预想今年能把通达OA替换其他平台的办公OA,比如泛微OA、致远OA等等。不过涉及预算和变更带来的风险,并核实通达OA 2017的确发布了一些新功能的尝试和平台设想的构架,包括应用中心和流程中心是很值得期待的,让我跃跃欲试,很想把生产在用的OA平台升级到这个版本2017。不过冷静下来,还得等待稳定的版本再做定夺。

期间,我简单尝试搭建一个免费20人用户的测试版本来验证2017是否能够符合我们公司业务需求的想法。在此分享一些用户和思路:

应用中心的删除和修改功能

若新应用启用了设定的流程,则删除和修改只能在流程中心的《我的工作》来做修改和删除。反之,可通过应用设计界面“是否停用流程”设置即可直接在应用中心的记录列表来操作修改和删除。

应用中心-记录删除和修改

参考链接:

http://club.tongda2000.com/forum.php?mod=viewthread&tid=34931&page=1#pid118530

通达OA 2017已发布升级版本,公司有意向想升级到最新版本。故此在临时服务器上搭建测试环境。过程中碰到如下问题,记录并包括解决方案:

  1. 停止OA所有服务并退出Monitor.exe.
  2. 拷贝MYOA根目录下的大部分文件夹,可除去bak, attach等目录(这些文件都很大,可升级后慢慢迁移)。
  3. 双机bin目录下的autoconfig.exe配置新环境。

office_redis服务不能启动

可能原因:

1、进行过替换bin目录的操作,替换前后两个bin目录对应的OA的安装路径不一致导致的。

2、myoa\attach下缺少redis_data目录或redis_data\heap目录或redis_data目录下的aof文件损坏导致。

解决方法:

1、记事本打开myoa\bin\redis.windows.conf,按盘符搜索,修改以下几处对应的路径:

1)logfile D:/MYOA/logs/redis.log

2)dir D:/MYOA/attach/redis_data

3)heapdir D:/MYOA/attach/redis_data/heap

2、从备份的myoa\attach中拷贝redis_data目录恢复或者把缺失的目录手动创建上,若目录都在,属于aof文件损坏导致,则将该文件重命名一下,再重启服务即可。

我们的问题就是缺失attach目录,故此我们新建并补齐这一目录即可把office_redis服务正常运行起来。

Office_Web服务不能启动

从log日志显示2367端口被占用:服务启动失败, 侦听线程创建不成功,端口 2367 被占用。

解决方法:

打开OA的MYSQL数据执行语句:

update sys_para set PARA_VALUE='2368' where PARA_NAME= 'WEB_SVC_PORT';

改一下端口2368或其他端口直到可以运行为止。

参考链接:

如何解决office_redis服务不能启动的问题?
Office_Web服务启动不了,log日志显示2367端口被占用?

批量更新用户权限

禁止OA登录,禁止手机登录,禁止使用即时通讯(资源有限):

UPDATE user SET NOT_LOGIN=1, NOT_MOBILE_LOGIN=1, IM_RANGE=2 WHERE DEPT_ID=0

这段时间想把服务上的DNN7升级到最新版本DNN9,为了保险起见,提前在本地搭建一个测试的升级环境。故关键第一步就是如何把托管服务器上的网站环境部署到本地。期间碰到两个重要问题:

数据库备份文件的导入

本想新建一个空数据库,然后直接导入bak备份文件,系统提示错误(代码号:3154):

The backup set holds a backup of a database other than the existing “xx” database…

解决方案:

– Don’t create an empty database and restore the .bak file on to it.
– Use ‘Restore Database’ option accessible by right clicking the “Databases” branch of the SQL Server Management Studio and provide the database name while providing the source to restore.

同时保证相应的xxx.mdf等文件是有效路径即可。

网站的本地部署

DNN网站目录的权限、数据库的PortalAlias对应的记录也修改成本地IIS的相关设置完成后即可访问。然而我们碰到一个IIS的错误提示:

HTTP 错误 500.19

原因:原本托管服务上的IIS安装了url rewrite module, 而我们本地IIS没有安装这一组件。

解决方案:

安装组件url rewrite module或注释web.config的配置项:

<!--<rewrite>
  <rules>
    <rule name="Redirect01" stopProcessing="true">
      <match url="^account-login.aspx$" ignoreCase="true" />
      <action type="Redirect" url="/signin" redirectType="Permanent" />
    </rule>
    <rule name="Redirect02" stopProcessing="true">
      <match url="^account_login.aspx$" ignoreCase="true" />
      <action type="Redirect" url="/signin" redirectType="Permanent" />
    </rule>
    <rule name="Redirect03" stopProcessing="true">
      <match url="^showcase.aspx$" ignoreCase="true" />
      <action type="Redirect" url="/company/case-studies" redirectType="Permanent" />
    </rule>
  </rules>
</rewrite>-->

SunBlogNuke Runs well with DNN9

DNN9 finally released

As the article DNN 9 and the Future of the DNN Platform mentioned, Few goals that DNN offical team wanted to accomplish for this platform:

  • Reconstruct DNN to minimize our reliance on Web Forms architecture
  • Provide developers the freedom to use a variety of frameworks
  • Protect customers’ existing investments in DNN
  • Provide a fully supported upgrade path for everyone

DNN 9 represents the next step on our journey towards creating a more modern platform and further minimizing our use of Web Forms. Firstly the pre-released DNN9 with a brand new administrative experience that replaces the dated Web Forms based admin and host modules that we use today. Yes,this superstar is called “the Persona Bar“.

Plus there are some interesting points discussed in the comment section, for example:

  • Dnn is losing the needle of the compass and is becoming another type of wordpress but not focus on DNN philosophy
  • Why DNN lost more and more developers these years? due to the addition of MVC and SPA support or because they waited too long to support alternative frameworks.
  • There is ZERO advantage of using MVC in DNN. Plese skip crippled MVC in DNN and just embrace the development in WebForms or the newer SPA

Some notes for any dnn guys want to try DNN9:

  • Telerik won’t be going away completely in DNN 9. We hope to have that project finished for 9.1 or 9.2. Redoing the Admin Experience has been a big job and we were not able to completely redo the remaining modules that still use Telerik.
  • The host features did not go away at all. They have been incorporated and collapsed into the other administrative pages. see https://1drv.ms/i/s!AmCAjuMs3hO9j7Y6I_LdrZ5EVDMnzA These settings only show up for host users.

Other resources links:

DNN 9 Appears to Be a Foundational Step Forward for the Future of DNN

DNN Blog Module SunBlogNuke compatible well with DNN9

Our DNN blog module SunBlogNuke straight out of the box comes ready to embrace any changes and always compatible well with the latest DNN core package DNN9. Not only we will apply any handy tools, such as SPA framework and Boostrap UI framework, with our products, but also we assure that SunBlogNuke is still the best publishing tool with News, Magazine & Articles, for example Markdown support with better writing experience and the core Html/Text module is on road of integration.

And another good news for any DNN guys interested in our modules, is that we will include all the separate modules into the one-collection for SunBlogNuke, for example:

And the important point is that they will be all free for DNN Community. Please have a try on them later and if you are satisfied with those widgets, feel free to get us a coffee below :)

BUY ME A Coffee

What is SPA?

A Single-page application (SPA), also known as a single-page interface (SPI), is a web application or web site that fits on a single web page with the goal of providing a more fluid user experience.

Single Page Application

Breaking changes

  1. 支持.net 4.5+版本
  2. 向上兼容IE8+
  3. 所有管理模块可插拔
  4. 默认删除导航提供模块,只保留DDR
  5. 轻量级default.css
  6. 剔除Telerik控件
  7. 更多查看下边链接…

DNN 8 BREAKING CHANGES

Set up environment

Introduction to SPA modules

DNN8开发模板

BETA DNN 8 Project Templates V6.1 for Visual Studio 2015

昨天公司UPS挂了导致服务器断电,重启以后通达OA的MYSQL服务再也无法启用。查询通达OA官方的文档,并根据log文件的错误提示最终把数据恢复回来,在此备忘记录一下。

修改innodb_buffer_pool_size

查找MySQL的错误日志文件(MYOA\data5\机器名.err)会记录如下类似内容:

130409 15:54:31 [Note] Plugin 'FEDERATED' is disabled.
130409 15:54:31 InnoDB: The InnoDB memory heap is disabled
130409 15:54:31 InnoDB: Mutexes and rw_locks use Windows interlocked functions
130409 15:54:31 InnoDB: Compressed tables use zlib 1.2.3
130409 15:54:32 InnoDB: Initializing buffer pool, size = 1023.0M
InnoDB: VirtualAlloc(1086849024 bytes) failed; Windows error 8
130409 15:54:32 InnoDB: Completed initialization of buffer pool
130409 15:54:32 InnoDB: Fatal error: cannot allocate memory for the buffer pool
130409 15:54:32 [ERROR] Plugin 'InnoDB' init function returned error.
130409 15:54:32 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
130409 15:54:32 [ERROR] Unknown/unsupported storage engine: Innodb
130409 15:54:32 [ERROR] Aborting

解决方法:

此情况出现的原因是myoa\mysql5\my.ini中innodb_buffer_pool_size的值太大,OA服务器操作系统不支持所致。改小后再启动mysql5_OA服务即可,恢复正常可以再改回原来的值。默认为1024M。

如果修改完innodb_buffer_pool_size依然运行不起来,查看log又出现如下类似内容:

160822 19:14:38 [Note] Plugin 'FEDERATED' is disabled.
160822 19:14:38 InnoDB: The InnoDB memory heap is disabled
160822 19:14:38 InnoDB: Mutexes and rw_locks use Windows interlocked functions
160822 19:14:38 InnoDB: Compressed tables use zlib 1.2.3
160822 19:14:38 InnoDB: Initializing buffer pool, size = 299.0M
160822 19:14:38 InnoDB: Completed initialization of buffer pool
160822 19:14:38 InnoDB: highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn 5772634979
160822 19:14:38  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Doing recovery: scanned up to log sequence number 5772636095
160822 19:14:38  InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 

需要执行:

强制启动mysql服务 -》修改 innodb_force_recovery = 6

具体步骤参照官方文档:

1)打开\MYOA\mysql5\my.ini,去掉innodb_force_recovery=1前边的注释。

2)启动MySQL5_OA服务,此时MySQL处于只读状态,可以导出,不可写入。如果仍不能启动,可以尝试将innodb_force_recovery修改为2、3、4、5、6等,直到可以启动为止。(备注:一般情况下,3、4、6、7步骤可选及可省略)

3)使用MySQL管理工具比如Navicat for MySQL,将TD_OA等相关的数据库导出为SQL文件, 记得务必要保留创建表结构的导出结果。

4)停止MySQL5_OA服务,删除TD_OA下的所有文件、ibdata1、ib_logfile0、ib_logfile1等文件。

5)打开\MYOA\mysql5\my.ini,在innodb_force_recovery=1前边加上#号,将该项注释掉。

6)启动MySQL5_OA服务,然后导入此前备份的SQL文件。比如运行bin目录下的TDRecovery.exe,对数据库进行还原。

7)检查数据库,将无法通过该方法恢复的数据表,手动通过MySQL管理工具比如Navicat for MySQL把之前自动备份的单个SQL文件进行恢复。

参考链接:

如何解决mysql5_OA服务不能启动的问题?
通达OA服务器意外断电后数据库容易损坏的解决方案
Forcing InnoDB Recovery

Issue Detail

Lot of logs in Event Viewer related with “Scheduler Exception -Sequence contains more than one matching element”. This occurs when there is a duplicate entry in the WebServers table.

Solution

To verify if this is the issue, go to Host > SQL and run the following SQL query:

SELECT ServerName FROM {databaseOwner}[{objectQualifier}WebServers]

If you see the same entry more than once, you need to run the following SQL query:

DELETE FROM {databaseOwner}[{objectQualifier}WebServers]

Once that has been completed, hover over Tools->Recycle Application Domain to make it work with re-indexing.

Referrence

Scheduler Issues in DNN 7.3.x

Scheduler exception after Upgrade to 7.3.0

DNN 7.3.1 SCHEDULER EXCEPTION

What is exactly the 404 issue?

When using the Bootstrap iconic font and CSS toolkit, such as Glyphicons or Font Awesome, the font comes in a lot of flavors, including .ttf and woff. Somehow it seems that IIS will return a 404 not found when requesting the .woff file – even though the file definitely exists and the URL is correct.

Recommended Solution

The solution for this is to add the following segment to the WebServer section of your web.config:

<staticContent>
    <!-- Fix issue about loading woff font failure -->
    <remove fileExtension=".woff" />
    <mimeMap fileExtension=".woff" mimeType="application/font-woff" />
    <remove fileExtension=".woff2" />
    <mimeMap fileExtension=".woff2" mimeType="font/x-woff" />
</staticContent>

This configures IIS to understand that there is a woff mime type that it should care about, which magically makes the 404 go away.

You can add a remove node before adding the new mimeMap as the above coding to avoid a duplicate mime type error in case they are already there.

Alternative solution

If you don’t want to add this to the web.config, you can also configure the IIS server in the UI.

Just double-click the “MIME Types” configuration option while having IIS root node selected in the left panel and click “Add…” link in the Actions panel on the right. This will bring up the following dialog. Add .woff file extension and specify “application/x-font-woff” as the corresponding MIME type:

Add MIME Type for .woff file name extension:

Add MIME Type for .woff file name extension

This will force IIS to process .woff files correctly and will fix 404 errors associated with these files.

resources links:

Why is @font-face throwing a 404 error on woff files?

404 errors in IIS7 for embedded .woff font files

What is Highlight.js?

Highlight.js is a syntax highlighter written in JavaScript. It works in the browser as well as on the server. It works with pretty much any markup, doesn’t depend on any framework and has automatic language detection.

Project on Github

Why we should use Highlight.js?

  • 162 languages and 74 styles
  • automatic language detection
  • multi-language code highlighting
  • available for node.js
  • works with any markup
  • compatible with any js framework
  • works well with Markdown

How to apply Highlight.js with DNN Blog?

  1. Assume that you installed our blogging module called ‘SunBlogNuke

  2. Built blog instance with offical guidelin and enter Dashboadr/Customize/Style Editor section.

  3. From the right section, you should be able choose any theme view to be apply with Highlight.js. For example, the BasicView.ascx is for every item of the default post list when first loading blog page.

    choose it and copy the following coding below to register Highlight.js into this view:

    <%@ Register TagPrefix="dnn" Namespace="DotNetNuke.Web.Client.ClientResourceManagement" Assembly="DotNetNuke.Web.Client" %>
    <dnn:DnnJsInclude runat="server" ID="jshighlight" FilePath="~/DesktopModules/SunBlog/js/highlight/highlight.min.js" Priority="100" />
    

    yes, you feel free to replace CDN-hosted package, like that:

    <%@ Register TagPrefix="dnn" Namespace="DotNetNuke.Web.Client.ClientResourceManagement" Assembly="DotNetNuke.Web.Client" %>
    <dnn:DnnJsInclude runat="server" ID="jshighlight" FilePath="http://cdn.bootcss.com/highlight.js/9.5.0/highlight.min.js" Priority="100" />
    

    click “save chanegs”.

  4. Click the customized.js to add any javascript, now we want to init Highlight.js to make it work:

    jQuery(document).ready(function () {
        if (typeof hljs=== 'undefined'){}
        else
            hljs.initHighlightingOnLoad();
    });
    
  5. In the last, just make sure that you also register Highlight.js style, there is lots of way to complete, such as in the dnn skin or module style or dnn blog theme style. The core simplicity theme includes Highlight.js style in default, you may have a try.

BTW, the curent post is exactly writtten by Markdown and live demo for this JavaScript syntax highlighter :)