drupal

Docker : Drupal container linked to mysql container can't connect to mysql during Drupal installation

妖精的绣舞 提交于 2021-02-18 18:14:15
问题 I'm fairly new to docker, and I've just been going through the CMS's to see how easy they are to configure. So far, Wordpress and Joomla check out. When I run the drupal container linked to mysql, I get to the drupal installation screen and where it says to connect the DB, and I use my root credentials and db host being 'localhost', and receive errors trying to connect. I've attached an image to show you the output.drupal-config-db-output-error The error I get : Failed to connect to your

How do you get JSON data using $.getJSON with Node.js

天大地大妈咪最大 提交于 2021-02-17 05:39:28
问题 I'm new to Node.js. I already have a frontend javascript script that uses an API and gets weather data like so: function getTextWeatherUsingStation(theStation){ theURL = 'https://api.weather.gov/stations/' + theStation + '/observations/current'; // return new Promise((resolve, reject) => { $.getJSON(theURL,function(data){ var myJSON = JSON.stringify(data) I read that you can't just use a library as is. I converted it over to a Node.js friendly file by wrapping it in module.exports = { and

Can't access a cookie using document.cookie in JS

回眸只為那壹抹淺笑 提交于 2021-02-10 22:18:52
问题 I'm running into a weird problem. I'm building an external mobile webapp that intefaces with Drupal Services. When I call the login.json service, a cookie is set (or so I think) that tells Drupal that I'm logged in. The webapp is currently running under the same domain but in a subdirectory. But here's the tricky part. In my chrome resources browser, I can see the cookie under cookies. However, when I try to log the contents of document.cookie it comes back empty. What I need to do is check

How to replace field value in a Drupal Webform's validator?

痴心易碎 提交于 2021-02-08 04:46:52
问题 In a Drupal Webform, I'd like to alter the submitted value (e.g. to strip any non-numeric character) when going through the validator. I follow the validator readme to add in hook_webform_validation_validators and implement the hook_webform_validation_validate hook. However I cannot locate a return parameter to alter the submitted webform value. For example, if a user enters $12,340 , I'd like to fail the submission and update the webform value to 12340 .When the user submits the second time,

阿里云轻量应用服务器与云服务器ECS服务器对比优势

我怕爱的太早我们不能终老 提交于 2021-02-07 12:24:29
通过最近网友和客户的反馈,发现很多朋友有兴趣短期体验 阿里云 的“轻量应用服务器”,24元每月的价格,而且支持香港,跟ECS相比比相当优惠。原因多种: 价格优势:对比 阿里云 ECS香港地区,按照最低轻量的配置,1核1G1M25G的sssd硬盘,ECS价格为66.9元每月。香港轻量却仅仅24元每月,年付350元还有流量包等优惠。价格相差不止一倍。 新品优势:虽然轻量应用服务器推出市场已经超过一年,但是新品优势似乎没有那么受欢迎。所以至今仍可以算是轻量应用服务器的新品期。自然也就有了低廉的特价。 快捷模版:ECS毕竟属于传统物理机,VPS虚拟机的替代品。所以肩负着太多的任务类型,大中小型各种网站都依赖它,还得给配合SLB,RDS,缓存等等多种产品使用留余地。可是小用户并不划算,仅仅用来搭建个很常见的模板化小站。焉用牛刀?所以轻量一词也就成了这个服务器的名字关键字。使用轻量应用服务器可以轻松搭建wordPress、LAMP、Drupal、Node.js 、ECShop 、phpwind 、ASP/.NET、BT-Panel 等多种模版发布项目。将服务器系统环境配置过程优化为十步之内。 代替ECS:轻量应用服务器从推出到现在,已经追加了纯系统环境模板。这就相当于,单机应用可以使用轻量应用服务器完全代替ECS使用。 补充: 官网产品介绍 《什么是轻量应用服务器》 原文地址: https:/

CVE-2020-13671: Drupal 远程代码执行漏洞通告

a 夏天 提交于 2021-02-06 10:56:03
报告编号:B6-2020-111901 报告来源:360CERT 报告作者:360CERT 更新日期:2020-11-19 0x01 漏洞简述 2020年11月19日,360CERT监测发现 Drupal 发布了 Drupal 代码执行漏洞 的风险通告,该漏洞编号为 CVE-2020-13671 ,漏洞等级: 高危 ,漏洞评分: 8.1 。 未授权的远程攻击者通过 上传特定文件名的文件 ,可造成 任意代码执行 。 对此,360CERT建议广大用户及时将 Drupal 升级到最新版本。与此同时,请做好资产自查以及预防工作,以免遭受黑客攻击。 0x02 风险等级 360CERT对该漏洞的评定结果如下 评定方式 等级 威胁等级 高危 影响面 广泛 360CERT评分 8.1 0x03 漏洞详情 CVE-2020-13671: 代码执行漏洞 Drupal core 没有正确地处理上传文件中的某些文件名,这可能导致文件被解释为不正确的扩展名,并被用作错误的 MIME 类型,在某些特定的配置下,可能会被当作 php 解析,导致远程代码执行。 0x04 影响版本 - Drupal:Drupal : 9.0 - Drupal:Drupal : 8.9 - Drupal:Drupal : 8.8.x - Drupal:Drupal : 7 0x05 修复建议 通用修补建议 升级到最新版本: -

Retrieving a list from Content Type field in Drupal 7

橙三吉。 提交于 2021-02-04 19:48:45
问题 I'm sort of new to Drupal 7. I am using Drupal Form API and I need to use a drop-down showing a list of states via the mymodule_forms hook. $form['work_state'] = array( '#title' => t('Work State'), '#type' => 'select', ... ); I already have a list of states defined in a Content Type field. How would one go around loading the Content Type (ie: forms_stipend) and retrieving the field (ie: field_states). After that is retrieved, I can start populating the available list of states into the code

Bootstrap Drupal

元气小坏坏 提交于 2021-02-02 07:24:32
Sleek, intuitive, and powerful front-end framework for faster and easier web development. http://twitter.github.com/bootstrap/index.html http://drupal.org/project/twitter_bootstrap http://drupal.org/project/twitter_bootstrap_ui http://drupal.org/project/bh_bootstrap http://drupal.org/project/bootstrap 来源: oschina 链接: https://my.oschina.net/u/113490/blog/80118

Drupal Page returning 502 error page instead of 404

孤者浪人 提交于 2021-01-29 08:06:49
问题 When I am searching for a link from my drupal website https://example.com/index2.php?option=com_ckforms&view=ckforms&id=1&Itemid=190 i am getting 502(bad gateway) response and redirecting to 502 nginx error page instead of 404 as 5xx errors are reserved for actual service errors. I am getting "upstream sent unsupported FastCGI protocol version: 72 while reading response header from upstream" error in logs. I found that the reason could be- This server (Web Front-End) received an invalid

Drupal 8 add ajax form element after ajax callback

时光怂恿深爱的人放手 提交于 2021-01-27 11:43:37
问题 I am building a drupal form with multiple ajax enabled form elements. I have one select list that does an ajax callback after change. The problem is that it adds a new select list to the page, which is also ajax enabled. This does not seem to work, which seems logical to me because the ajax is actually bundled an added to the page so it is lost in the replacecommand. Is there anyone experienced with this, and does anyone have a solution ? This is my code /** * {@inheritdoc} */ public function