원인

이 스킨에는 단축키 적용이 되어 있었다.

w: /admin/entry/post/
e: /admin/skin/edit/
r: /admin/plugin/refererUrlLog/
h: /

그리고 해당키는 input과 textarea 태그를 제외한 곳에서 입력한 경우 발동되도록 액션이 걸려있다.

문제는 이 스킨의 댓글창은 div태그에 ContentEditable속성을 적용하여 만들어졌던 것이었다.

 

해결

스킨 html 편집을 하고 상단의 스크립트에서 getKey 함수의 if문의 조건을 다음과 같은 방식으로 변경한다.

<script>
    //추가 단축키
    var key = new Array();
    key['w'] = "/admin/entry/post/";
    key['e'] = "/admin/skin/edit/";
    key['r'] = "/admin/plugin/refererUrlLog/";
    key['h'] = "/";

    function getKey(keyStroke) {
      if (((event.srcElement.tagName === 'INPUT') || (event.srcElement.tagName === 'TEXTAREA') || (event.srcElement.tagName === 'DIV' && event.srcElement.isContentEditable))===false) {
        isNetscape = (document.layers);
        eventChooser = (isNetscape) ? keyStroke.which : event.keyCode;
        which = String.fromCharCode(eventChooser).toLowerCase();
        for (var i in key)
          if (which == i) window.location = key[i];
      }
    }
    document.onkeypress = getKey;
  </script>

 

'오류노트' 카테고리의 다른 글

IE 엑셀 다운로드 파일 바로열기 에러  (0) 2015.08.17

라든가 error msg=“Unable to gather” 등등

influxdb2에서 발생하는 에러인데

 

원인

나의 경우에는 보안인증서 적용후에 발생했는데 privkey.pem파일을 실행할 수 있는 권한이 없어서 발생한 문제였다.

 

해결

letsencrypt를 기준으로 해당 경로와 파일에 influxdb권한그룹과 계정이 권한을 가질 수 있도록 명령어를 작성하여 해결하였다.

centos기준

기존 파일에 읽기 권한을 부여함

setfacl -m d:user:influxdb:r /etc/letsencrypt/archive/[도메인]/privekey.pem

 

아래의 명령어로 미래에 생성될 파일에도 읽기 권한을 부여함

setfacl -m d:user:influxdb:r /etc/letsencrypt/archive/[도메인]

 

잘쓰던 포트였는데 갑자기 문제가 발생했다.

아래의 내용은 윈도우OS에서의 해결책이다.

 

내 원인

나의 경우에는 intellij에서 해당 포트와의 연결을 끊고 프로그램을 종료 했는데 그 후 재부팅을 하고 어쩌고 해도 저 포트를 사용할 수 없었다. 일반 콘솔에서도 동일한 에러가 발생하고 있었다.

 

해결

관리자 모드로 콘솔 혹은 파워셀을 연다.

net stop winnat
net start winnat

잘 된다.

 

출처: https://stackoverflow.com/questions/9164915/node-js-eacces-error-when-listening-on-most-ports

'오류노트 > Javascript' 카테고리의 다른 글

Material UI - RadioGroup , Radio 관련  (0) 2021.06.02

발생상황

centos7 에서 mysql 설치시 나온 메시지

 

해결

sudo rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022

후 진행하면 해결된다.

발생상황

mariadb 10.6을 설치해서 쓰고 있는 상태에서 python에서  pip install mariadb를 하니까 나옴

 

원인

MariaDB Connector/C 가 필요하다는 듯?

 

해결

yum install MariaDB-shared MariaDB-devel

 

오류내용

1. 선택이 안됨

2. RadioGroup의 value을 렌더링 후에 넣는 경우 오류 발생

 

원인 및 해결

1. Radio의 value가 문자열이 아니었음

2. RadioGroup 내에서 Radio를 반복문으로 출력하면서 value을 알 수 있는 상황이었는데, 임시방편으로 먼저 리스트에서 value 값을 find해놓고 설정해줌

 

오류내용

1. 대용량 다운안됨

2. ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION

 

해결방법

대용량 파일 다운로드 - 버퍼 삭제

크롬계열브라우저 다운안될때 - 파일명을 따옴표로 묶지 않기

 

풀소스

Response.Expires = 0
Response.Clear

Set fs = Server.CreateObject("Scripting.FileSystemObject")
If fs.FileExists("파일풀패스") Then
	user_agent = Request.ServerVariables("HTTP_USER_AGENT")
	'If Instr(user_agent,"Chrome") = 0 Then ' 크로미움이 아닐때만
	'	Response.AddHeader "Content-Disposition", "attachment;filename="""&파일명&""""   '큰따옴표 처리
	'End If
	Response.ContentType = "파일MIME타입"
	Response.AddHeader "Content-Disposition","attachment; filename="&파일명

	Response.AddHeader "Content-Transfer-Encoding","binary"
	Response.AddHeader "Pragma","no-cache"
	Response.AddHeader "Expires","0"
	
	Set objStream = Server.CreateObject("ADODB.Stream")
	objStream.Open
	objStream.Type = 1
	objStream.LoadFromFile "파일풀패스"
	
	Const CHUNK = 2048000
	Response.Buffer = False
	Response.ContentType = fileType
	Do Until objStream.EOS Or Not Response.IsClientConnected
		Response.BinaryWrite(objStream.Read(CHUNK))
	Loop
	objStream.Close
	
	Set strFile = Nothing
	Set objStream = Nothing

Else 
	'파일이 없을 경우...
	Response.Write "해당 파일을 찾을 수 없습니다."
End If

Set fs = Nothing
Response.End

 

 

200메가 넘는 파일도 잘 받아진다

 

오류내용

Caused by: org.springframework.data.mapping.PropertyReferenceException: No property

 

해결

JpaRe, Custom, Jpa Imple 파일명이 달라서 생긴 문제였다.

 

오류

Database "/Users/계정명/test" not found, either pre-create it or allow remote database creation (not recommended in secure environments) [90149-200] 90149/90149

 

해결

1안 Save Settings를 Generic H2 (Server)로 하고 JDBC URL을  jdbc:h2:tcp://localhost/~/test 로 하고 연결을 누르라고 하길래

난 애초에 여기서 에러가 났다 그래서 더 검색해봤더니

Generic H2 (Embedded) 로 하고 jdbc:h2:~/test 로 하고 연결을 누르라고 하길래

했으나 난 또 여기서 변함없이 에러가 났다.

h2를 지웠다 깔아서 해결하신 분을 봐서 해봤으나 소용이 없는 듯 했으나 언어를 English로 바꾸고 하니까 잘 됐다

한국어 설정이 문제였던 걸로 의심중

 

 

테이블이랑 데이터는 잘 들어왔는데 기본키 인덱스 이런거 다 없다.

 

참고 동영상: https://www.youtube.com/watch?v=UdLRcsJ7-0s

+ Recent posts