Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2007-11-29 13:13:07

gmorgan
Member
Registered: 2007-11-26
Posts: 42

Re: How to get my sections back

I know it doesn’t mention anything relating to the section page, its quite weird. I’ve upped the memory limit but it’s still moaning liking before. I very greatfull for all the help I’m getting btw.

Offline

#17 2007-11-29 13:16:32

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: How to get my sections back

Out of curiosity, just how many sections are there in your site anyway?


Steve

Offline

#18 2007-11-29 13:26:25

gmorgan
Member
Registered: 2007-11-26
Posts: 42

Re: How to get my sections back

about 200 odd, each course we have has to have its own section.

Offline

#19 2007-12-03 15:15:57

gmorgan
Member
Registered: 2007-11-26
Posts: 42

Re: How to get my sections back

can anybody help with this please!

Offline

#20 2007-12-03 17:28:22

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,388
Website GitHub Mastodon Twitter

Re: How to get my sections back

Can you post the diagnostics here?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#21 2007-12-04 08:47:05

gmorgan
Member
Registered: 2007-11-26
Posts: 42

Re: How to get my sections back

Textpattern version: 4.0.5 (r2466)
Last Update: 2007-10-09 08:50:16/2007-07-01 22:03:44
Document root: E:/Apache2/htdocs (E:\Apache2\htdocs)
$path_to_site: E:\Apache2\htdocs
Textpattern path: E:\Apache2\htdocs\textpattern
Permanent link mode: section_id_title
upload_tmp_dir: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\php\upload
Temporary directory path: E:/Apache2/htdocs/textpattern/tmp
Site URL: 194.82.216.4:8080
PHP version: 5.2.5
GD Image Library: unavailable
Server Local Time: 2007-12-04 09:44:48
MySQL: 5.0.15-nt
Locale: en_GB.UTF-8
Server: Apache/2.0.59 (Win32) PHP/5.2.5
Apache version: Apache/2.0.59 (Win32) PHP/5.2.5
PHP Server API: apache2handler
RFC 2616 headers:
Server OS: Windows NT 5.2

Pre-flight check:
————————————
Web Domain DNS lookup fails: 194.82.216.4
————————————

.htaccess file contents:
————————————
#DirectoryIndex index.php index.html

#Options +FollowSymLinks
#Options -Indexes

<IfModule mod_rewrite.c> RewriteEngine On #RewriteBase /relative/web/path/

RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+) – [PT,L]

RewriteRule ^(.*) index.php
</IfModule>

#php_value register_globals 0
————————————

Offline

#22 2007-12-04 10:49:40

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: How to get my sections back

Can you post the full diagnostics as well?

Offline

#23 2007-12-04 11:42:59

gmorgan
Member
Registered: 2007-11-26
Posts: 42

Re: How to get my sections back

what full diagnostics

Offline

#24 2007-12-04 12:00:51

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: How to get my sections back

diagnostics tab -> select ‘full’ from the select menu at the bottom.

Offline

#25 2007-12-04 12:21:45

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: How to get my sections back

Maybe you should use categories instead of such amount of different sections?


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#26 2007-12-04 12:46:11

gmorgan
Member
Registered: 2007-11-26
Posts: 42

Re: How to get my sections back

I never noticed that drop down before I’m blind.

Textpattern version: 4.0.5 (r2466)
Last Update: 2007-10-09 08:50:16/2007-07-01 22:03:44
Document root: E:/Apache2/htdocs (E:\Apache2\htdocs)
$path_to_site: E:\Apache2\htdocs
Textpattern path: E:\Apache2\htdocs\textpattern
Permanent link mode: section_id_title
upload_tmp_dir: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\php\upload
Temporary directory path: E:/Apache2/htdocs/textpattern/tmp
Site URL: 194.82.216.4:8080
PHP version: 5.2.5
GD Image Library: unavailable
Server Local Time: 2007-12-04 13:42:28
MySQL: 5.0.15-nt
Locale: en_GB.UTF-8
Server: Apache/2.0.59 (Win32) PHP/5.2.5
Apache version: Apache/2.0.59 (Win32) PHP/5.2.5
PHP Server API: apache2handler
RFC 2616 headers:
Server OS: Windows NT 5.2

Pre-flight check:
————————————
Web Domain DNS lookup fails: 194.82.216.4
————————————

.htaccess file contents:
————————————
#DirectoryIndex index.php index.html

#Options +FollowSymLinks
#Options -Indexes

<IfModule mod_rewrite.c> RewriteEngine On #RewriteBase /relative/web/path/

RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+) – [PT,L]

RewriteRule ^(.*) index.php
</IfModule>

#php_value register_globals 0
————————————

Charset (default/config): latin1/utf8
character_set_client: utf8
character_set_connection: utf8
character_set_database: latin1
character_set_results: utf8
character_set_server: latin1
character_set_system: utf8
character_sets_dir: E:\MySQL\share\charsets/
17 Tables: -

PHP extensions: bcmath, calendar, com_dotnet/0.1, ctype, session, filter/0.11.0, ftp, hash/1.0, iconv, json/1.2.1, odbc/1.0, pcre, Reflection/0.1, date/5.2.5, libxml, standard/5.2.5, tokenizer/0.1, zlib/1.1, SimpleXML/0.1, dom/20031129, SPL/0.2, wddx, xml, xmlreader/0.1, xmlwriter/0.1, apache2handler, mysql/1.0

Apache modules: core, mod_win32, mpm_winnt, http_core, mod_so, mod_access, mod_actions, mod_alias, mod_asis, mod_auth, mod_autoindex, mod_cgi, mod_dir, mod_env, mod_imap, mod_include, mod_isapi, mod_log_config, mod_mime, mod_negotiation, mod_rewrite, mod_setenvif, mod_userdir, mod_php5

pretext_data: array ( ‘id’ => ‘’, ‘s’ => ‘’, ‘c’ => ‘’, ‘q’ => ‘’, ‘pg’ => ‘’, ‘p’ => ‘’, ‘month’ => ‘’, ‘author’ => ‘’, ‘request_uri’ => ‘/464895fddef4f55889fe105f1e950db8/?txpcleantest=1’, ‘qs’ => ‘txpcleantest=1’, ‘subpath’ => ‘\\/’, ‘req’ => ‘/464895fddef4f55889fe105f1e950db8/?txpcleantest=1’,
)

/include/txp_category.php: r2243 (3706fea923cd77f7053f7803de169df4)
/include/txp_plugin.php: r1917 (c63f72f33986c08367672fc9fe7b42dd)
/include/txp_auth.php: r2356 (33255ec1ea1a825163c78272496d8783)
/include/txp_form.php: r1913 (ecea3fecf9d7d1f8088cda67f097eceb)
/include/txp_section.php: r1891 (1f0121b3e2969d94bc8a7fb98bfdfbd5)
/include/txp_tag.php: r2260 (1bd67bdb9dcfb72e34ea967e39406216)
/include/txp_list.php: r2450 (997a3b1bec7115bf49b76f62b28da146)
/include/txp_page.php: r2099 (56bde34b6c7bcb9123ac91e73065e894)
/include/txp_discuss.php: r2451 (91e0b29ef39a9471ae5c78d0b1bba086)
/include/txp_prefs.php: r2405 (a4b76476930b2376199f23fbfd5f1ac9)
/include/txp_log.php: r2439 (16730c34e2a437dd88b8f5cc7eff8218)
/include/txp_preview.php: r1238 (696728f35f3557b648c011bb4d6496c3)
/include/txp_image.php: r2439 (9fac6ed0d9d4c3d8196492051f38dc9a)
/include/txp_article.php: r2453 (bdac8fcac5df2f93f10afa7e50c3fb6f)
/include/txp_css.php: r2403 (4e8c52bb1cf5bfe2e2f0640892f9b92e)
/include/txp_admin.php: r2403 (f8700a3d453ece08e7f137b47c967eda)
/include/txp_link.php: r2463 (0a0171bf606296106332d3fdcb83a678)
/include/txp_diag.php: r2361 (dccf3269049dd25e59afdd7ad8d235cd)
/include/txp_file.php: r2403 (e62abd5fcadabe629322ed17135d89eb)
/include/txp_import.php: r1238 (70a6207c0f3604ecfc4b20369986c4d7)
/lib/admin_config.php: r1747 (a2eb09f94d7902a6e95750fc4abcea17)
/lib/txplib_misc.php: r2464 (615afd44a10311f1c0b7852d9bc15d24)
/lib/taglib.php: r1535 (9b519f9dc88791e5ee8eacc029dd6975)
/lib/txplib_head.php: r2404 (2e067b25997cf67cddbdd365570e69d5)
/lib/classTextile.php: r2462 (a031e2ea894e339711c601f230c5ee71)
/lib/txplib_html.php: r2403 (97e173da3058b438513df67fd7d1ceca)
/lib/txplib_db.php: r2406 (5ed67642f805639b54e381fb22efd208)
/lib/IXRClass.php: r765 (137b91497628f0058a2fca9eba5c3b7f)
/lib/txplib_forms.php: r2403 (438a734b52acef40b36d8a3ba23987e8)
/lib/class.thumb.php: r2329 (b2a2fda54371dbd6c40ba553941f090e)
/lib/constants.php: r2361 (ab6d51668fab1e3c98e7d520b1a59f0f)
/lib/txplib_update.php: r1239 (10f28a986d23187b436369dc29ab552f)
/lib/txplib_wrapper.php: r2286 (419125ec74a17a70bf1e86ebfcd45253)
/publish/taghandlers.php: r2444 (cc9de8f2018b01398a2ba542c5f5bdc6)
/publish/atom.php: r2402 (46c4402717f695fde0d49d806adfa4c4)
/publish/log.php: r1637 (5254d0f3942086bc55723923307a51db)
/publish/comment.php: r2460 (2d1ae1dec0784f044e7005fa5ed50930)
/publish/search.php: r1748 (8c86ebcb5be08e214d81ca15a32164ca)
/publish/rss.php: r2393 (09aac29bf22ffa71c1e118e851cff3c3)
/publish.php: r2436 (7087864f1e7c6efe096d3b8e07c350b1)
/index.php: r2466 (30ecf35de5c1edc6ef68e780c8c79daa)
/css.php: r944 (8beba8f83a091068723435cdcdc02f2f)

Offline

#27 2007-12-04 14:13:36

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: How to get my sections back

Edit the textpattern/include/txp_section.php file on your local Mac (where it works fine) to include two maxMemUsage lines in the sec_section_list function(), like this:

               $rs = safe_rows_start('*', 'txp_section', "name != 'default' order by name");

                if ($rs)
                {
                        while ($a = nextRow($rs))
                        {
maxMemUsage();

and

                echo n.n.endTable();
echo maxMemUsage('TEST_SECTION_MEMORY_USAGE', 1);
        }

//-------------------------------------------------------------
        function section_create() 

then load the sections tab and check the source code to find the maximum memory used by this tab.

BTW. how did this problem start happening? After you upgraded TXP (what was the old version)? After adding another section? After something (what?) on the server was upgraded or changed?

Offline

#28 2007-12-04 14:26:28

gmorgan
Member
Registered: 2007-11-26
Posts: 42

Re: How to get my sections back

I’ll try this out straight away. Everything was fine on the server version, all I can remember doing was updating the templates in the presentation and suddenly the sections screen kept loading up blank.

Offline

#29 2007-12-04 14:36:35

gmorgan
Member
Registered: 2007-11-26
Posts: 42

Re: How to get my sections back

I cant find sec_section_list function()

<?php

/* This is Textpattern

Copyright 2005 by Dean Allen www.textpattern.com All rights reserved

Use of this software indicates acceptance ofthe Textpattern license agreement

$HeadURL: http://svn.textpattern.com/releases/4.0.5/source/textpattern/include/txp_section.php $
$LastChangedRevision: 1891 $

*/

if (!defined(‘txpinterface’)) die(‘txpinterface is undefined.’);

if ($event == ‘section’) { require_privs(‘section’);

if(!$step or !function_exists($step) or !in_array($step, array(‘sec_section_list’,‘section_create’,‘section_delete’,‘section_save’))){ sec_section_list(); } else $step(); }

// ——————————————————————————————-

function sec_section_list($message = ‘’) { global $wlink;

pagetop(gTxt(‘sections’), $message);

$default = safe_row(‘page, css’, ‘txp_section’, “name = ‘default’”);

$pages = safe_column(‘name’, ‘txp_page’, “1 = 1”); $styles = safe_column(‘name’, ‘txp_css’, “1 = 1”);

echo n.n.startTable(‘list’).

n.n.tr( tda( n.n.hed(gTxt(‘section_head’).sp.popHelp(‘section_category’), 1).

n.n.form( fInput(‘text’, ‘name’, ‘’, ‘edit’, ‘’, ‘’, 10). fInput(‘submit’, ‘’, gTxt(‘create’), ‘smallerbox’). eInput(‘section’). sInput(‘section_create’) ) , ‘ colspan=“3”’) ).

n.n.tr( td(gTxt(‘default’)).

td( form( ‘<table>’.

tr( fLabelCell(gTxt(‘uses_page’).’:’). td( selectInput(‘page’, $pages, $default[‘page’]).sp.popHelp(‘section_uses_page’) , ‘’, ‘noline’) ).

tr( fLabelCell(gTxt(‘uses_style’).’:’) . td( selectInput(‘css’, $styles, $default[‘css’]).sp.popHelp(‘section_uses_css’) , ‘’, ‘noline’) ).

tr( tda( fInput(‘submit’, ‘’, gTxt(‘save_button’), ‘smallerbox’). eInput(‘section’). sInput(‘section_save’). hInput(‘name’,‘default’) , ‘ colspan=“2” class=“noline”’) ).

endTable() ) ).

td() );

$rs = safe_rows_start(‘*’, ‘txp_section’, “name != ‘default’ order by name”);

if ($rs) { while ($a = nextRow($rs)) {
maxMemUsage();
error_log(maxMemUsage($name, 1));

extract($a);

echo n.n.tr( n.td($name).

n.td( form( ‘<table>’.

n.n.tr( fLabelCell(gTxt(‘section_name’).’:’). fInputCell(‘name’, $name, 1, 20) ).

n.n.tr( fLabelCell(gTxt(‘section_longtitle’).’:’). fInputCell(‘title’, $title, 1, 20) ).

n.n.tr( fLabelCell(gTxt(‘uses_page’).’:’). td( selectInput(‘page’, $pages, $page).sp.popHelp(‘section_uses_page’) , ‘’, ‘noline’) ).

n.n.tr( fLabelCell(gTxt(‘uses_style’).’:’). td( selectInput(‘css’, $styles, $css).sp.popHelp(‘section_uses_css’) , ‘’, ‘noline’) ).

n.n.tr( fLabelCell(gTxt(‘selected_by_default’).’?’). td( yesnoradio(‘is_default’, $is_default, ‘’, $name).sp.popHelp(‘section_is_default’) , ‘’, ‘noline’) ).

n.n.tr( fLabelCell(gTxt(‘on_front_page’).’?’). td( yesnoradio(‘on_frontpage’, $on_frontpage, ‘’, $name).sp.popHelp(‘section_on_frontpage’) , ‘’, ‘noline’) ).

n.n.tr( fLabelCell(gTxt(‘syndicate’).’?’) . td( yesnoradio(‘in_rss’, $in_rss, ‘’, $name).sp.popHelp(‘section_syndicate’) , ‘’, ‘noline’) ).

n.n.tr( fLabelCell(gTxt(‘include_in_search’).’?’). td( yesnoradio(‘searchable’, $searchable, ‘’, $name).sp.popHelp(‘section_searchable’) , ‘’, ‘noline’) ).

n.n.tr( tda( fInput(‘submit’, ‘’, gTxt(‘save_button’), ‘smallerbox’). eInput(‘section’). sInput(‘section_save’). hInput(‘old_name’, $name) , ‘ colspan=“2” class=“noline”’) ).

endTable() ) ).

td( dLink(‘section’, ‘section_delete’, ‘name’, $name, ‘’, ‘type’, ‘section’) ) ); } }

echo n.n.endTable();
echo maxMemUsage('TEST_SECTION_MEMORY_USAGE', 1);

}

//——————————————————————————————- function section_create() { global $txpcfg; $name = ps(‘name’);

//Prevent non url chars on section names include_once txpath.’/lib/classTextile.php’; $textile = new Textile(); $title = $textile->TextileThis($name,1); $name = sanitizeForUrl($name);

$chk = fetch(‘name’,‘txp_section’,‘name’,$name);

if (!$chk) { if ($name) { $rs = safe_insert( “txp_section”, “name = ‘”.doSlash($name) .”’, title = ‘”.doSlash($title).”’, page = ‘default’, css = ‘default’, is_default = 0, in_rss = 1, on_frontpage = 1” );

if ($rs) { update_lastmod();

$message = gTxt(‘section_created’, array(‘{name}’ => $name));

sec_section_list($message); } }

else { sec_section_list(); } }

else { $message = gTxt(‘section_name_already_exists’, array(‘{name}’ => $name));

sec_section_list($message); } }

//——————————————————————————————-

function section_save() { global $txpcfg;

extract(doSlash(psa(array(‘page’,‘css’,‘old_name’)))); extract(psa(array(‘name’, ‘title’)));

if (empty($title)) { $title = $name; }

// Prevent non url chars on section names include_once txpath.’/lib/classTextile.php’;

$textile = new Textile(); $title = doSlash($textile->TextileThis($title,1)); $name = doSlash(sanitizeForUrl($name));

if ($old_name && (strtolower($name) != strtolower($old_name))) { if (safe_field(‘name’, ‘txp_section’, “name=’$name’”)) { $message = gTxt(‘section_name_already_exists’, array(‘{name}’ => $name));

sec_section_list($message); return; } }

if ($name == ‘default’) { safe_update(‘txp_section’, “page = ‘$page’, css = ‘$css’”, “name = ‘default’”);

update_lastmod(); }

else { extract(array_map(‘assert_int’,psa(array(‘is_default’,‘on_frontpage’,‘in_rss’,‘searchable’)))); // note this means ‘selected by default’ not ‘default page’ if ($is_default) { safe_update(“txp_section”, “is_default = 0”, “name != ‘$old_name’”); }

safe_update(‘txp_section’, “ name = ‘$name’, title = ‘$title’, page = ‘$page’, css = ‘$css’, is_default = $is_default, on_frontpage = $on_frontpage, in_rss = $in_rss, searchable = $searchable “, “name = ‘$old_name’”);

safe_update(‘textpattern’, “Section = ‘$name’”, “Section = ‘$old_name’”);

update_lastmod(); }

$message = gTxt(‘section_updated’, array(‘{name}’ => $name));

sec_section_list($message); }

// ——————————————————————————————-

function section_delete() { $name = ps(‘name’);

safe_delete(‘txp_section’, “name = ‘”.doSlash($name).”’”);

$message = gTxt(‘section_deleted’, array(‘{name}’ => $name));

sec_section_list($message); }

?>

Last edited by ruud (2007-12-05 13:24:03)

Offline

#30 2007-12-04 15:06:10

gmorgan
Member
Registered: 2007-11-26
Posts: 42

Re: How to get my sections back

<!— Memory: 1312Kb, TEST_SECTION_MEMORY_USAGE —>
<!— runtime: 0.0432 —>
Heres what the local version is using.

Offline

Board footer

Powered by FluxBB