1

주제: 전체 보기 리스트 문제 확인 부탁드립니다

sandbox로 블로그를 사용할 때, 카테고리에서 전체 보기 하면 전체 보기 리스트가 모두 올바로 출력되시나요? 저의 경우 아무 페이지도 나오지가 않습니다.

이 문제가 .htaccess의 문제인지, 아니면 태터 내부의 문제인지 알기 위해서 다른 분의 테스트가 필요합니다 ㅠ_ㅠ 테스트 가능하신 분들은 한 번 테스트해 보시고 결과좀 올려주세요. 부탁드립니다 smile

"Everything looks different on the other side."

-Ian Malcomm, from Michael Crichton's 'The Jurassic Park'

2

답글: 전체 보기 리스트 문제 확인 부탁드립니다

.htaccess에선 별다른 문제가 없는것 같네요.
category/index.php에서 entry model을 부르고 돌려받는 부분이 문제가 있는지 확인 중입니다.

"Everything looks different on the other side."

-Ian Malcomm, from Michael Crichton's 'The Jurassic Park'

3

답글: 전체 보기 리스트 문제 확인 부탁드립니다

전 잘 되네요. smile

4

답글: 전체 보기 리스트 문제 확인 부탁드립니다

제 경우엔 희한합니다;;;
전체 보기와 특정한 카테고리만 출력이 안되고 나머지는 잘 되네요. ㅠ_ㅠ

"Everything looks different on the other side."

-Ian Malcomm, from Michael Crichton's 'The Jurassic Park'

5

답글: 전체 보기 리스트 문제 확인 부탁드립니다

원인 찾았습니다.
getEntriesWithPagingByCategory 에서 너무 목록이 길 경우 처리를 못합니다.. sad

이제 고치는 일만 남았네요.

"Everything looks different on the other side."

-Ian Malcomm, from Michael Crichton's 'The Jurassic Park'

6

답글: 전체 보기 리스트 문제 확인 부탁드립니다

저 혹시 한 카테고리에 글이 600여개 이상이신 분 계시면 마찬가지 테스트 부탁드릴 수 있을까요? 카테고리를 눌러서 글 목록이 제대로 출력되는지 확인 부탁 드립니다 smile 아직 글 수가 원인인지, 다른 요소가 있는지 판단하기가 어렵네요...


전체 글수가 600개 이상이신 분도 테스트 가능하십니다. 카테고리에서  '전체보기'를 눌러서 목록이 나오는지 확인 부탁드립니다 big_smile

"Everything looks different on the other side."

-Ian Malcomm, from Michael Crichton's 'The Jurassic Park'

7

답글: 전체 보기 리스트 문제 확인 부탁드립니다

음... 이 경우에 해당되는지는 모르겠지만.
제 블로그가 글수는 450여개 쯤 넘는데요.
어느날 부턴가 전체카테고리 보기가 안됩니다.
잘 되던게 말이죠..

텍스트큐브를 이용하시다 불편하신 점 있으시면 아래로 연락주세요.
Needlworks/TNF - LonnieNa
nateon : y12x2 (a.t) nate.com / mail : lonniena (a.t) needlworks.org
http://twitter.com/@textcube

8

답글: 전체 보기 리스트 문제 확인 부탁드립니다

LonnieNa 작성:

음... 이 경우에 해당되는지는 모르겠지만.
제 블로그가 글수는 450여개 쯤 넘는데요.
어느날 부턴가 전체카테고리 보기가 안됩니다.
잘 되던게 말이죠..

역시 저만 안되던게 아니었군요 ㅠ_ㅠ
카테고리 검색시 글 수가 어느 이상을 넘어가면 출력이 안됩니다.
끄어 확실한 원인부터 찾아서 수정해보려고 이 파일 저 파일 따라가고 있습니다 ㅠ_ㅠ

"Everything looks different on the other side."

-Ian Malcomm, from Michael Crichton's 'The Jurassic Park'

9

답글: 전체 보기 리스트 문제 확인 부탁드립니다

LonnieNa 작성:

음... 이 경우에 해당되는지는 모르겠지만.
제 블로그가 글수는 450여개 쯤 넘는데요.
어느날 부턴가 전체카테고리 보기가 안됩니다.
잘 되던게 말이죠..

네...정말 그렇던데요 ?
전 일부러 그렇게 해놓았는데...잘 되던것이 갑자기 안된다는 것이죠 ??
살펴봐야겠군요 smile

10

답글: 전체 보기 리스트 문제 확인 부탁드립니다

chester 작성:
LonnieNa 작성:

음... 이 경우에 해당되는지는 모르겠지만.
제 블로그가 글수는 450여개 쯤 넘는데요.
어느날 부턴가 전체카테고리 보기가 안됩니다.
잘 되던게 말이죠..

네...정말 그렇던데요 ?
전 일부러 그렇게 해놓았는데...잘 되던것이 갑자기 안된다는 것이죠 ??
살펴봐야겠군요 smile

네에.. 일부러 막을지도 몰라요..ㅜ
어느날 갑자기 안되더라구요. 저도 저만 그런줄 알고 제가 머 잘못했나 싶었어요.
질답게시판에 썼었지만 답변도 없어서 그냥 그러려니 하고 있던차에.. 이 글을 발견했네요.

텍스트큐브를 이용하시다 불편하신 점 있으시면 아래로 연락주세요.
Needlworks/TNF - LonnieNa
nateon : y12x2 (a.t) nate.com / mail : lonniena (a.t) needlworks.org
http://twitter.com/@textcube

11

답글: 전체 보기 리스트 문제 확인 부탁드립니다

inureyes 작성:

저 혹시 한 카테고리에 글이 600여개 이상이신 분 계시면 마찬가지 테스트 부탁드릴 수 있을까요? 카테고리를 눌러서 글 목록이 제대로 출력되는지 확인 부탁 드립니다 smile 아직 글 수가 원인인지, 다른 요소가 있는지 판단하기가 어렵네요...


전체 글수가 600개 이상이신 분도 테스트 가능하십니다. 카테고리에서  '전체보기'를 눌러서 목록이 나오는지 확인 부탁드립니다 big_smile

이건 사실 매우 치명적인 문제로 보여지는군요..1.0.5 티켓으로 등록하고 특별관리 되어야 할것 같은 느낌입니다. smile

12

답글: 전체 보기 리스트 문제 확인 부탁드립니다

테스트를 위해 만개는 좀 심한것 같고
9,999개의 INSERT후 카테고리를 선택했습니다.

아래코드에서 타임아웃이 발생합니다.
(스킨치환자를 dress함수를 이용하여 실제값으로 변경하는 부분이군요.
생각보다 단순(??)하게 되어 있군요.)

lib/piece/blog/list.php

foreach ($list['items'] as $item) {
   $itemView = $skin->listItem;
   dress('list_rep_regdate', Timestamp::format3($item['published']), $itemView);
   dress('list_rep_link', "$blogURL/" . ($blog['useSlogan'] ? "entry/{$item['slogan']}" : $item['id']), $itemView);
   dress('list_rep_title', htmlspecialchars($item['title']), $itemView);
   if ($item['comments'] > 0)
      dress('list_rep_rp_cnt', "({$item['comments']})", $itemView);
   $itemsView .= $itemView;
}

$itemsView변수에 값이 저장되기도 전에 오류가 발생하므로
entries.php end.php 는 실행되지 않습니다.

blog/category/index.php에
@set_time_limit(0);
을 두어 나오게는 만들수 있지만 근본적인 해결방법은
아닌것 같네요.

스킨처리로직의 속도향상이 필요할것 같습니다.
지금  해결을 해볼려고 하지만 쉽지가 않군요..



... Template_ 가 머리속을 스쳐지나 가는군요.

webthink (2006-04-23 03:38:00)에 의해 마지막으로 수정

13

답글: 전체 보기 리스트 문제 확인 부탁드립니다

1. lib/model/entry.php ==> getEntryListByCategory 함수 수정

기존

function getEntryListByCategory($owner, $category) {
    global $database;
    if ($category === null)
        return array();
    if ($category > 0) {
        $categories = fetchQueryColumn("SELECT id FROM {$database['prefix']}Categories WHERE owner = $owner AND parent = $category");
        array_push($categories, $category);
        $cond = 'AND category IN (' . implode(', ', $categories) . ')';
    } else
        $cond = 'AND category >= 0';
    $visibility = doesHaveOwnership() ? '' : 'AND visibility > 0';
    $sql = "SELECT * FROM {$database['prefix']}Entries WHERE owner = $owner AND draft = 0 $visibility $cond ORDER BY published DESC";
    return fetchQueryAll($sql);
}

변경 : content를 제외한 데이터만 배열로 만든다.

function getEntryListByCategory($owner, $category) {
    global $database;
    if ($category === null)
        return array();
    if ($category > 0) {
        $categories = fetchQueryColumn("SELECT id FROM {$database['prefix']}Categories WHERE owner = $owner AND parent = $category");
        array_push($categories, $category);
        $cond = 'AND category IN (' . implode(', ', $categories) . ')';
    } else
        $cond = 'AND category >= 0';
    $visibility = doesHaveOwnership() ? '' : 'AND visibility > 0';
    $sql = "SELECT owner,id,draft,visibility,category,title,slogan,
                  location,password,acceptComment,acceptTrackback,
                  published,created,modified,comments,trackbacks 
             FROM {$database['prefix']}Entries WHERE owner = $owner AND draft = 0 $visibility $cond ORDER BY published DESC";
    return fetchQueryAll($sql);
}

2. lib/piece/blog/list.php 수정

기존

<?
if (isset($list)) {
    $listView = $skin->list;
    $itemsView = '';
    foreach ($list['items'] as $item) {
        $itemView = $skin->listItem;
        dress('list_rep_regdate', Timestamp::format3($item['published']), $itemView);
        dress('list_rep_link', "$blogURL/" . ($blog['useSlogan'] ? "entry/{$item['slogan']}" : $item['id']), $itemView);
        dress('list_rep_title', htmlspecialchars($item['title']), $itemView);
        if ($item['comments'] > 0)
            dress('list_rep_rp_cnt', "({$item['comments']})", $itemView);
        $itemsView .= $itemView;
    }
    dress('list_rep', $itemsView, $listView);
    dress('list_conform', htmlspecialchars($list['title']), $listView);
    dress('list_count', count($list['items']), $listView);
    dress('list', $listView, $view);
}
?>

변경 : dress함수의 잦은 호출로 인한 오버헤드 증가해결 및 중복스킨호출 수정

<?
if (isset($list)) {
    $listView = $skin->list;
    $itemsView = '';
    foreach ($list['items'] as $item) {        
        $lo_src = array(
            "[##_list_rep_regdate_##]",
            "[##_list_rep_link_##]",
            "[##_list_rep_title_##]",
            "[##_list_rep_rp_cnt_##]"
        );                
        $lo_tar = array(
            Timestamp::format3($item['published']),
            "$blogURL/" . ($blog['useSlogan'] ? "entry/{$item['slogan']}" : $item['id']),
            htmlspecialchars($item['title']),
            ($item['comments'] > 0) ? "(".$item['comments'].")" : ""
        );        
        $itemView = str_replace($lo_src,$lo_tar,$skin->listItem);        
        unset($lo_src);
        unset($lo_tar);        
        $itemsView .= $itemView;
    }        
    dress('list_rep', $itemsView, $listView);
    dress('list_conform', htmlspecialchars($list['title']), $listView);
    dress('list_count', count($list['items']), $listView);
    dress('list', $listView, $view);
}
?>

수정해서 sandBox에 반영했습니다. 첫경험(??)이라  부족한 부분이 많습니다.
아래는 커밋로그 입니다.

포럼 http://www.tattertools.com/ko/forum/viewtopic.php?id=171

카테고리목록을 가져올때 내용까지 가져와서 배열로 저장함에따라
글수와 상관없이 글내용이 많을경우 overflow 발생및 timeout발생
getEntryListByCategory 함수를 수정하여 content는 가져오지않는다.
스킨변환부분 dress함수의 잦은 호출로 인하 오버헤드증가및 스킨중복
호출수정 한번만 불러와서 전체를 변경한다.

글많이 등록되어 있으신분들 테스트 해보세요. 전 뉴스긁어와서 9999개정도
등록하고 테스트 해봤습니다.
http://ghj.pe.kr/attach/1/1030069386.gif

webthink (2006-04-23 05:41:08)에 의해 마지막으로 수정

14

답글: 전체 보기 리스트 문제 확인 부탁드립니다

오버헤드가 문제였네요 >_<
DB읽어오는 부분 보면서 그것까지는 생각을 못했었습니다.

어제 등록한 티켓 오늘 아참에 이렇게 마무리 되는군요. smile

http://dev.tattertools.com/ticket/38

"Everything looks different on the other side."

-Ian Malcomm, from Michael Crichton's 'The Jurassic Park'