게시판 첨부파일 다운로드 오류

 

<link rel="stylesheet" href="/wp-content/uploads/jquery-nice-select-1.1.0/css/nice-select.css"/>


<div id="kboard-default-list">

	<!-- 게시판 정보 시작 -->
	<div class="kboard-list-header">
		<div class="header-right">
			<?php if(!$board->isPrivate()):?>
				<div class="kboard-total-count">
					<?php echo __('Total', 'kboard')?> <?php echo number_format($board->getListTotal())?>
				</div>
			<?php endif?>

			<!-- 카테고리 시작 -->
			<?php
			if($board->use_category == 'yes'){
				if($board->isTreeCategoryActive()){
					$category_type = 'tree-select';
				}
				else{
					$category_type = 'default';
				}
				$category_type = apply_filters('kboard_skin_category_type', $category_type, $board, $boardBuilder);
				echo $skin->load($board->skin, "list-category-{$category_type}.php", $vars);
			}
			?>
			<!-- 카테고리 끝 -->
		</div>	
			
		<!-- 검색폼 시작 cuustom -->
		<div class="kboard-search">
			<form class="kboard-search-form" id="kboard-search-form-<?php echo $board->id?>" method="get" action="<?php echo esc_url($url->toString())?>">
				<?php echo $url->set('pageid', '1')->set('target', 'title')->set('keyword', 'title')->set('mod', 'list')->toInput()?>

				<!--<select name="target">
					<option value=""><?php echo __('All', 'kboard')?></option>
					<option value="title"<?php if(kboard_target() == 'title'):?> selected<?php endif?>><?php echo __('Title', 'kboard')?></option>
					<option value="content"<?php if(kboard_target() == 'content'):?> selected<?php endif?>><?php echo __('Content', 'kboard')?></option>
					<option value="member_display"<?php if(kboard_target() == 'member_display'):?> selected<?php endif?>><?php echo __('Author', 'kboard')?></option>
				</select>-->
				<input id="field" class="field" type="text" name="keyword" value="<?php echo esc_attr(kboard_keyword())?>">
				<div class="icons-container">
					<button class="icon-search" type="submit" class="kboard-default-button-small"><?php echo __('Search', 'kboard')?></button>
					<div onclick="delet()" class="icon-close">
					  <div class="x-up"></div>
					  <div class="x-down"></div>
					</div>	
			  	</div>
			</form>
		</div>
		<!-- 검색폼 끝 -->
	
	<script>
		$(document).on('ready', function() {
		  $('.field').on('focus', function() {
			$('body').addClass('is-focus');
		  });

		  $('.field').on('blur', function() {
			$('body').removeClass('is-focus is-type');
		  });

		  $('.field').on('keydown', function(event) {
			$('body').addClass('is-type');
			if((event.which === 8) && $(this).val() === '') {
			  $('body').removeClass('is-type');
			}
		  });
			
			});
	</script>
		
	<script>
		function delet() {
			document.getElementById("field").value ='';
		}
	</script>

		
		<!--<div class="kboard-sort">
			<form id="kboard-sort-form-<?php echo $board->id?>" method="get" action="<?php echo esc_url($url->toString())?>">
				<?php echo $url->set('pageid', '1')->set('category1', '')->set('category2', '')->set('target', '')->set('keyword', '')->set('mod', 'list')->set('kboard_list_sort_remember', $board->id)->toInput()?>
				
				<select name="kboard_list_sort" onchange="jQuery('#kboard-sort-form-<?php echo $board->id?>').submit();">
					<option value="newest"<?php if($list->getSorting() == 'newest'):?> selected<?php endif?>><?php echo __('Newest', 'kboard')?></option>
					<option value="best"<?php if($list->getSorting() == 'best'):?> selected<?php endif?>><?php echo __('Best', 'kboard')?></option>
					<option value="viewed"<?php if($list->getSorting() == 'viewed'):?> selected<?php endif?>><?php echo __('Viewed', 'kboard')?></option>
					<option value="updated"<?php if($list->getSorting() == 'updated'):?> selected<?php endif?>><?php echo __('Updated', 'kboard')?></option>
				</select>
			</form>
		</div>-->
	</div>
	<!-- 게시판 정보 끝 -->
	
	
	
	<!-- 리스트 시작 -->
	<div class="kboard-list">
		<table>
			<thead>
				<tr>
					<td class="kboard-list-uid"><?php echo __('Number', 'kboard')?></td>
					<td class="kboard-list-title"><?php echo __('Title', 'kboard')?></td>
					<td class="kboard-list-attach1">MSDS(첨부파일1)</td>
					<td class="kboard-list-attach2">TDS(첨부파일2)</td>
					<!--<td class="kboard-list-user"><?php echo __('Author', 'kboard')?></td>
					<td class="kboard-list-vote"><?php echo __('Votes', 'kboard')?></td>
					<td class="kboard-list-view"><?php echo __('Views', 'kboard')?></td>-->
					<td class="kboard-list-date"><?php echo __('Date', 'kboard')?></td>
				</tr>
			</thead>
			<tbody>
				<?php while($content = $list->hasNextNotice()):?>
				<tr class="<?php echo esc_attr($content->getClass())?>">
					<td class="kboard-list-uid"><?php echo __('Notice', 'kboard')?></td>
					
					<!--카다로그 카테고리 입력필드 추가-->
					<td class="catal"><?php echo $content->option->{'tree_category_1?'}?></td>
					
					<td class="kboard-list-title">
						<!--날짜 입력필드 추가-->
					
						<a href="<?php echo esc_url($url->getDocumentURLWithUID($content->uid))?>" target="_blank">
							<div class="kboard-default-cut-strings">
								<p class="certifidate"><?php echo $content->option->{'certifidate'}?></p>
								
								<?php if($content->isNew()):?><span class="kboard-default-new-notify">New</span><?php endif?>
								<?php if($content->secret):?><img src="<?php echo $skin_path?>/images/icon-lock.png" alt="<?php echo __('Secret', 'kboard')?>"><?php endif?>
								<?php echo $content->title?>
								<span class="kboard-comments-count"><?php echo $content->getCommentsCount()?></span>
								<button class="kboard-btn easOut"><i class="fa-solid fa-arrow-right"></i></button>
							</div>
						</a>
						<div class="kboard-mobile-contents">
							<span class="contents-item kboard-user"><?php echo $content->getUserDisplay()?></span>
							<span class="contents-separator kboard-date">|</span>
							<span class="contents-item kboard-date"><?php echo $content->getDate()?></span>
							<span class="contents-separator kboard-vote">|</span>
							<span class="contents-item kboard-vote"><?php echo __('Votes', 'kboard')?> <?php echo $content->vote?></span>
							<span class="contents-separator kboard-view">|</span>
							<span class="contents-item kboard-view"><?php echo __('Views', 'kboard')?> <?php echo $content->view?></span>
						</div>
					</td>

					<td class="kboard-list-date"><?php echo $content->getDate()?></td>
					<!--
					<td class="kboard-list-user"><?php echo $content->getUserDisplay()?></td>
					<td class="kboard-list-vote"><?php echo $content->vote?></td>
					<td class="kboard-list-view"><?php echo $content->view?></td>-->
					
<td class="kboard-list-attach1">
	<?php if($content->isAttached()):?>
	<button type="button" class="kboard-button-action kboard-button-download" onclick="window.location.href='<?php echo $url->getDownloadURLWithAttach($content->uid, 'file1')?>'" title="<?php echo sprintf(__('Download %s', 'kboard'), $content->attach->file1[1])?>"><?php echo $content->attach->file1[1]?></button>
	<?php endif?>
</td>
<td class="kboard-list-attach2">
	<?php if($content->isAttached()):?>
	<button type="button" class="kboard-button-action kboard-button-download" onclick="window.location.href='<?php echo $url->getDownloadURLWithAttach($content->uid, 'file2')?>'" title="<?php echo sprintf(__('Download %s', 'kboard'), $content->attach->file2[1])?>"><?php echo $content->attach->file2[1]?></button>
	<?php endif?>
</td>
				</tr>
				<?php endwhile?>
				<?php while($content = $list->hasNextPopular()):?>
				<tr class="<?php echo esc_attr($content->getClass())?>">
					<td class="kboard-list-uid">No.<?php echo esc_html($board->getPopularName())?></td>
					<!--카다로그 카테고리 입력필드 추가-->
					<td class="catal"><?php echo $content->option->{'tree_category_1?'}?></td>
					
					<td class="kboard-list-title">
						<!--날짜 입력필드 추가-->
					
						<a href="<?php echo esc_url($url->getDocumentURLWithUID($content->uid))?>" target="_blank">							
							<div class="kboard-default-cut-strings">
								<p class="certifidate"><?php echo $content->option->{'certifidate'}?></p>
								
						
								
								<?php if($content->isNew()):?><span class="kboard-default-new-notify">New</span><?php endif?>
								<?php if($content->secret):?><img src="<?php echo $skin_path?>/images/icon-lock.png" alt="<?php echo __('Secret', 'kboard')?>"><?php endif?>
								<?php echo $content->title?>
								<span class="kboard-comments-count"><?php echo $content->getCommentsCount()?></span>
								<button class="kboard-btn easOut"><i class="fa-solid fa-arrow-right"></i></button>
							</div>
						</a>
						<div class="kboard-mobile-contents">
							<span class="contents-item kboard-user"><?php echo $content->getUserDisplay()?></span>
							<span class="contents-separator kboard-date">|</span>
							<span class="contents-item kboard-date"><?php echo $content->getDate()?></span>
							<span class="contents-separator kboard-vote">|</span>
							<span class="contents-item kboard-vote"><?php echo __('Votes', 'kboard')?> <?php echo $content->vote?></span>
							<span class="contents-separator kboard-view">|</span>
							<span class="contents-item kboard-view"><?php echo __('Views', 'kboard')?> <?php echo $content->view?></span>
						</div>
					</td>
					
					<td class="kboard-list-date"><?php echo $content->getDate()?></td>
					<!--
					<td class="kboard-list-user"><?php echo $content->getUserDisplay()?></td>
					<td class="kboard-list-vote"><?php echo $content->vote?></td>
					<td class="kboard-list-view"><?php echo $content->view?></td>-->
					
		<td class="kboard-list-attach1">
	<?php if($content->isAttached()):?>
	<button type="button" class="kboard-button-action kboard-button-download" onclick="window.location.href='<?php echo $url->getDownloadURLWithAttach($content->uid, 'file1')?>'" title="<?php echo sprintf(__('Download %s', 'kboard'), $content->attach->file1[1])?>"><?php echo $content->attach->file1[1]?></button>
	<?php endif?>
</td>
<td class="kboard-list-attach2">
	<?php if($content->isAttached()):?>
	<button type="button" class="kboard-button-action kboard-button-download" onclick="window.location.href='<?php echo $url->getDownloadURLWithAttach($content->uid, 'file2')?>'" title="<?php echo sprintf(__('Download %s', 'kboard'), $content->attach->file2[1])?>"><?php echo $content->attach->file2[1]?></button>
	<?php endif?>
</td>			
				</tr>
				<?php endwhile?>
				<?php while($content = $list->hasNext()):?>
				<tr class="<?php echo esc_attr($content->getClass())?>">
					<td class="kboard-list-uid">No.<?php echo $list->index()?></td>
					<!--카다로그 카테고리 입력필드 추가-->
					<td class="catal"><?php echo $content->option->{'tree_category_1?'}?></td>
					
					<td class="kboard-list-title">
						<a href="<?php echo esc_url($url->getDocumentURLWithUID($content->uid))?>" target="_blank">
							
							
							<div class="kboard-default-cut-strings">
								<p class="certifidate"><?php echo $content->option->{'certifidate'}?></p>
								
								<?php if($content->isNew()):?><span class="kboard-default-new-notify">New</span><?php endif?>
								<?php if($content->secret):?><img src="<?php echo $skin_path?>/images/icon-lock.png" alt="<?php echo __('Secret', 'kboard')?>"><?php endif?>
								<?php echo $content->title?>
								<span class="kboard-comments-count"><?php echo $content->getCommentsCount()?></span>
								<button class="kboard-btn easOut"><i class="fa-solid fa-arrow-right"></i></button>
							</div>
						</a>
						<div class="kboard-mobile-contents">
							<span class="contents-item kboard-user"><?php echo $content->getUserDisplay()?></span>
							<span class="contents-separator kboard-date">|</span>
							<span class="contents-item kboard-date"><?php echo $content->getDate()?></span>
							<span class="contents-separator kboard-vote">|</span>
							<span class="contents-item kboard-vote"><?php echo __('Votes', 'kboard')?> <?php echo $content->vote?></span>
							<span class="contents-separator kboard-view">|</span>
							<span class="contents-item kboard-view"><?php echo __('Views', 'kboard')?> <?php echo $content->view?></span>
						</div>
					</td>
			
					<!--
					<td class="kboard-list-user"><?php echo $content->getUserDisplay()?></td>
					<td class="kboard-list-vote"><?php echo $content->vote?></td>
					<td class="kboard-list-view"><?php echo $content->view?></td>-->
					<td class="kboard-list-date"><?php echo $content->getDate()?></td>
					
<td class="kboard-list-attach1">
	<?php if($content->isAttached()):?>
	<button type="button" class="kboard-button-action kboard-button-download" onclick="window.location.href='<?php echo $url->getDownloadURLWithAttach($content->uid, 'file1')?>'" title="<?php echo sprintf(__('Download %s', 'kboard'), $content->attach->file1[1])?>"><?php echo $content->attach->file1[1]?></button>
	<?php endif?>
</td>
<td class="kboard-list-attach2">
	<?php if($content->isAttached()):?>
	<button type="button" class="kboard-button-action kboard-button-download" onclick="window.location.href='<?php echo $url->getDownloadURLWithAttach($content->uid, 'file2')?>'" title="<?php echo sprintf(__('Download %s', 'kboard'), $content->attach->file2[1])?>"><?php echo $content->attach->file2[1]?></button>
	<?php endif?>
</td>
					
				</tr>
				<?php $boardBuilder->builderReply($content->uid)?>
				<?php endwhile?>
			</tbody>
		</table>
	</div>
	<!-- 리스트 끝 -->
	
		<!-- 페이징 시작 -->
		<div class="kboard-pagination">
			<ul class="kboard-pagination-pages">
				<?php echo kboard_pagination($list->page, $list->total, $list->rpp)?>
			</ul>
		</div>

	<!-- 페이징 끝 -->
	
	<!-- 검색폼 시작
	<div class="kboard-search">
		<form id="kboard-search-form-<?php echo $board->id?>" method="get" action="<?php echo esc_url($url->toString())?>">
			<?php echo $url->set('pageid', '1')->set('target', '')->set('keyword', '')->set('mod', 'list')->toInput()?>
			
			<select name="target">
				<option value=""><?php echo __('All', 'kboard')?></option>
				<option value="title"<?php if(kboard_target() == 'title'):?> selected<?php endif?>><?php echo __('Title', 'kboard')?></option>
				<option value="content"<?php if(kboard_target() == 'content'):?> selected<?php endif?>><?php echo __('Content', 'kboard')?></option>
				<option value="member_display"<?php if(kboard_target() == 'member_display'):?> selected<?php endif?>><?php echo __('Author', 'kboard')?></option>
			</select>
			<input type="text" name="keyword" value="<?php echo esc_attr(kboard_keyword())?>">
			<button type="submit" class="kboard-default-button-small"><?php echo __('Search', 'kboard')?></button>
		</form>
	</div>-->
	
	<?php if($board->isAdmin()):?>
	<!-- 버튼 시작 -->
	<div class="kboard-control">
		<a class="borderBtnOran" href="<?php echo esc_url($url->getContentEditor())?>" class="kboard-default-button-small"><?php echo __('New', 'kboard')?></a>
	</div>
	<!-- 버튼 끝 -->
	<?php endif?>
	
	<?php if($board->contribution()):?>
	<!--<div class="kboard-default-poweredby">
		<a href="https://www.cosmosfarm.com/products/kboard" onclick="window.open(this.href);return false;" title="<?php echo __('KBoard is the best community software available for WordPress', 'kboard')?>">Powered by KBoard</a>
	</div>-->
	<?php endif?>
</div>

<script>
	$('.kboard-total-count').each(function() {
		var text = $(this).html();
		$(this).html(text.replace('전체', 'Total.'));
	});	
</script>




<!-- 관련 script는 footer에 삽입 -->
<script>
$(document).ready(function() {
  $('select').niceSelect();
	//$("html").niceScroll();	
	//$(".list").niceScroll();
	$('.xyz').on('click',function(){
		
		event();
	});
});
</script>

https://www.cosmosfarm.com/threads/document/28718

이글을 참고해서 list.php를 수정했습니다.

그런데 처음에는 리스트에서 첨부파일이 다운이 됬었는데

어느순간 인터넷 연결을 확인하라는 메세지와 함께 다운이 안됩니다.

무슨문제일까요?ㅠㅠ

참고링크: https://pumster.com/%EA%B8%B0%EC%88%A0%EC%9E%90%EB%A3%8Ctest/

https://imgur.com/a/Y3gvFhX

 

디버그를 활성화시키면 이런 오류가 뜹니다. 이게 문제인 걸까요?

Notice: Undefined property: stdClass::$file2 in /pumster3/www/wp-content/plugins/kboard/skin/default/list.php on line 259 Notice: Trying to access array offset on value of type null in /pumster3/www/wp-content/plugins/kboard/skin/default/list.php on line 259

 

플러그인이나 테마 충돌 없습니다. ftp에 첨부파일은 업로드 된거 확인했습니다. 이게시판만 다운이 이상하게 안됩니다.

좋은 정보와 인맥을 동시에, 워드프레스 사용자 단톡방 참여하기
워드프레스 에러 기술지원 서비스 전문가에게 맡기세요
좋은 정보와 인맥을 동시에, 워드프레스 사용자 단톡방 참여하기

AI 상담