本来想写个随笔,突然发现站点挂了….
Fatal error: Uncaught Error: Call to undefined function wp_get_view_transitions_admin_css() in C:\xxxxxxxxx\wp-includes\script-loader.php:1754 Stack trace: #0 C:\xxxxxxxxx\wp-includes\class-wp-hook.php(341): wp_default_styles(Object(WP_Styles)) #1 C:\xxxxxxxxx\wp-includes\class-wp-hook.php(365): WP_Hook->apply_filters(NULL, Array) #2 C:\xxxxxxxxx\wp-includes\plugin.php(570): WP_Hook->do_action(Array) #3 C:\xxxxxxxxx\wp-includes\class-wp-styles.php(121): do_action_ref_array('wp_default_styl...', Array) #4 C:\xxxxxxxxx\wp-includes\functions.wp-styles.php(24): WP_Styles->__construct() #5 C:\xxxxxxxxx\wp-includes\functions.wp-styles.php(214): wp_styles() #6 C:\xxxxxxxxx\wp-includes\blocks.php(315): wp_style_is('wp-block-legacy...', 'registered') #7 C:\xxxxxxxxx\wp-includes\blocks.php(703): register_block_style_handle(Array, 'editorStyle') #8 C:\xxxxxxxxx\wp-includes\blocks\legacy-widget.php(68): re in C:\xxxxxxxxx\wp-includes\script-loader.php on line 1754
大致的原因是wordpress启动的时候无法找到函数wp_get_view_transitions_admin_css()的定义。判断应该是wordpress源文件的缺失,解决方法如下:
找到服务器上wordpress目录下的wp-includes/version.php ,在里面搜索wordpress的version,然后记下来,去官网Release Archive – WordPress.org找到对应的wordpress版本的源码下载下来,解压之后删掉wp-content这个文件夹,这个文件夹存储的是站内内容;随后将删除wp-content的所有文件覆盖服务器上wordpress的目录,一般就OK了。
wp_get_view_transitions_admin_css()这个函数是wordpress6.4版本以上引入的,还有我的报错信息可能旁敲侧击地泄露了一些其它,希望各位不要攻击我。。。。我只想做一些分享。。。。
q:为什么只要定义了contextBridge.exposeInMainWorld 就能直接在其它的js中直接引用
a:preload 脚本在主进程创建窗口时指定,在页面加载前执行
创建渲染进程前指定preload.js -> 渲染进程可以调用preload.js所暴露的方法
q:ipcRenderer.invoke()默认就是向主进程发消息吗
a:是的 且只能向主进程发送消息
app.on ipcMain.on ipcRenderer 什么时候触发?
渲染进程send->主进程on
渲染进程invoke->主进程handle
主进程send->渲染进程on
q:渲染进程的页面上右键默认就是chromium向主进程发送context-menu信息吗?
a:是的 只要在主进程中对这个渲染进程窗口监听webcontent.on(‘context-menu’)就好了
