Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#37 2011-01-26 15:53:38
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: HELP! Side-bar disappeared
n2: I’m glad you managed to solve the problem, but it is not helpful to remove your posts from this thread. Even though you solved your problem, others might still benefit from it. Please don’t do that again?
Offline
Re: HELP! Side-bar disappeared
n2 wrote:
Yes, I was up all night and finally fixed it by cleaning up code in the Index.php files.
Glad you got it fixed; sorry it took an all-nighter. What did you change?
Active plugins: zem_paginate-0.1m, chh_if_data-0.10, rah_sitemap-0.1.2, rvm_css-0.3, rvm_privileged-0.3, glx_hl_current-0.3, zem_event-0.3.5m, asy_wondertag-0.5, asy_jpcache-0.9.8m, hak_tinymce-0.7.4, stm_article_order-0.2, adi_menu-0.6, kml_flashembed-1.4.3, aro_slideshow-0.4.1
My only comment here is that asy_wondertag
is not needed when using Txp 4.0.7 or later, and that upgrading to at least 4.0.7 is recommended anyway, for security reasons.
Some Textpattern files are out of date:
/index.php
Some Textpattern files have been modified:
/../index.php
That’s from the prior mod(s) (jpcache) and whatever you did last night.
The following PHP functions (which may be necessary to run Textpattern) are disabled on your server: apache_get_modules, apache_get_version, apache_getenv, apache_note, apache_setenv, disk_free_space, diskfreespace, highlight_file, ini_alter, ini_restore, openlog, proc_nice, show_source, symlink
For more details see here. Although two of those functions are used by Txp, the site has clean URLs working so I don’t think there’s a concern.
.htaccess file contents:
Pretty standard Txp .htaccess. The only addition is the rah_sitemap
rule, and that looks fine, and a couple of redirects at the bottom; those also look OK to me, though I’m no mod_rewrite
expert.
Now that you can log in again, the best way to begin figuring out what’s up with the sidebar is to show us the tag trace from that page. (See my sig for instructions.) Note that when you put the site into debug mode (necessary to output a tag trace), any error messages that were previously suppressed when the site was in “live” mode will now appear at the top of the page, so I suggest checking the live site immediately, grabbing the trace, and if there are error messages showing, quickly return the site to “live”.
As Els notes, it’s best to leave old posts up. There’s no security issue with posting the site URL, as long as the site doesn’t have any completely obvious login/password combos.
Code is topiary
Offline
#39 2011-01-26 16:15:28
- n2
- Member
- Registered: 2011-01-25
- Posts: 56
Re: HELP! Side-bar disappeared
OK.
Meanwhile…. do you know how i can solve the sidebar problem?
Thanks.
If code is poetry, I’m a lousy poet.
Offline
Re: HELP! Side-bar disappeared
Note the second-to-last paragraph of my previous post.
Code is topiary
Offline
#41 2011-01-26 16:22:38
- n2
- Member
- Registered: 2011-01-25
- Posts: 56
Re: HELP! Side-bar disappeared
Thanks so much, Jeff.
Here’s the tag trace at last:
Tag error: <txp:site_names/> -> Textpattern Warning: tag does not exist on line 983
textpattern/publish.php:983 trigger_error()
processTags()
textpattern/publish.php:929 preg_replace_callback()
textpattern/lib/txplib_misc.php:1460 parse()
textpattern/publish/taghandlers.php:249 parse_form()
textpattern/publish.php:970 output_form()
processTags()
textpattern/publish.php:929 preg_replace_callback()
textpattern/publish.php:466 parse()
index.php:44 textpattern()
jsoo wrote:
….. show us the tag trace from that page.
If code is poetry, I’m a lousy poet.
Offline
Re: HELP! Side-bar disappeared
Thanks. Tag trace is actually the part from the bottom of the page — it’s entirely enclosed in HTML comment delimiters, so it doesn’t appear unless you “view source” It’s typically quite long — at least a couple of screenfuls.
The error message you’ve shown is because txp:site_names/>
is not a legitimate Txp tag. It should be <txp:site_name />
. I can’t tell you where it is without seeing the full trace. Quickest way to find such things is install the smd_where_used plugin to search for it.
Code is topiary
Offline
#43 2011-01-26 16:43:34
- n2
- Member
- Registered: 2011-01-25
- Posts: 56
Re: HELP! Side-bar disappeared
Thanks. Here’s what i did to fix the log-in and index.php errors:
.
1) I downloaded a fresh copy of Textpattern install files, but did not install.
2) I unzipped them so i could extract and view the original index.php files in both the admin folder and the inner TP folder in public_html
3) Then i compared line-by-line the new install files with the existing ones on my friend’s server.
4) I corrected or replaced the parts of the code that seemed incorrect or incomplete, including any syntax errors.
5) I also took at any references to the new version (4.3) in my own files since it’s in an earlier version.
6) I uploaded the two corrected index.php files to my friend’s server and they worked fine.
7) I thanked the cyber-Gods and finally went to sleep at 4 am. :) :(
.
jsoo wrote:
Glad you got it fixed; sorry it took an all-nighter. What did you change?
Last edited by n2 (2011-01-26 16:44:54)
If code is poetry, I’m a lousy poet.
Offline
#44 2011-01-26 16:48:04
- n2
- Member
- Registered: 2011-01-25
- Posts: 56
Re: HELP! Side-bar disappeared
Ok; did the tag-trace and here’s the end of the source code:
<txp:output_form form=“nav_promote” />
[SQL (0.000509): select Form from txp_form where name=‘nav_promote’]
[Form: nav_promote]
<txp:chh_if_data>
[<txp:chh_if_data>: true]
<txp:linklist category=“Promoted-Pages” sort=“linksort asc” />
[SQL (0.001383): select *, unix_timestamp(date) as uDate from txp_link where category IN (‘Promoted-Pages’) order by linksort asc ]
[<txp:chh_if_data>: false]
</txp:chh_if_data>
<txp:output_form form=“newsletter” />
[SQL (0.000465): select Form from txp_form where name=‘newsletter’]
[Form: newsletter]
<txp:output_form form=“siteinfo” />
[SQL (0.001141): select Form from txp_form where name=‘siteinfo’]
[Form: siteinfo]
<txp:site_url/>
<txp:output_form form=“footer” />
[SQL (0.000927): select Form from txp_form where name=‘footer’]
[Form: footer]
[ ~~~ secondpass ~~~ ]
Last edited by n2 (2011-01-26 20:35:42)
If code is poetry, I’m a lousy poet.
Offline
#45 2011-01-26 18:06:17
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: HELP! Side-bar disappeared
n2 wrote:
Thanks. Here’s what i did to fix the log-in and index.php errors:
1) I downloaded a fresh copy of Textpattern install files, but did not install.
2) I unzipped them so i could extract and view the original index.php files in both the admin folder and the inner TP folder in public_html
3) Then i compared line-by-line the new install files with the existing ones on my friend’s server.
4) I corrected or replaced the parts of the code that seemed incorrect or incomplete, including any syntax errors.
5) I also took at any references to the new version (4.3) in my own files since it’s in an earlier version.
6) I uploaded the two corrected index.php files to my friend’s server and they worked fine.
7) I thanked the cyber-Gods and finally went to sleep at 4 am. :) :(
None of the .php files should be modified anyway. Though it’s a good thing to check what exactly was modified, it’s better (and easier) to just overwrite the modified files with the default ones.
And when you’re done with fixing your site, upgrade to the latest version :)
Last edited by els (2011-01-26 18:06:51)
Offline
Re: HELP! Side-bar disappeared
OK, the <txp:site_names/>
error is from the form named “branding”, so go to Presentation->Forms and look for that form, then change <txp:site_names/>
to <txp:site_name />
.
Based on the info you’ve provided so far, my surmise is that the call to output the sidebar is inside the “true” part of the if_individual_article
block on the default template. Let’s see the default template.
Code is topiary
Offline
#47 2011-01-26 18:16:45
- n2
- Member
- Registered: 2011-01-25
- Posts: 56
Re: HELP! Side-bar disappeared
Because of the difference in versions, part of the codes for each new php file was resulting in errors on our server.
That’s why i was doing it line by line to make sure and to catch any version-related code and delete it from my file code. That did the trick.
I’ll let someone else tackle the upgrade. I was just stepping in to help out with a couple of site additions, but not knowing TP at all, it’s turned into a 30+ hr proposition…
But I really need to resolve the sidebar issue as soon as possible…
Els wrote:
it’s better (and easier) to just overwrite the modified files with the default ones.And when you’re done with fixing your site, upgrade to the latest version :)
Last edited by n2 (2011-01-26 18:35:42)
If code is poetry, I’m a lousy poet.
Offline
Re: HELP! Side-bar disappeared
And as Els says, in general not a good idea to use modified core files unless you know why. I don’t see a problem using the 4.3.0 root index.php on a 4.0.6 site, but I should think the admin-side index.php would cause problems if you just stuck it in to a 4.0.6 site. If you aren’t ready to upgrade yet you can get the old versions of the files here.
Code is topiary
Offline