Breaking serendipity with creative ways...

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
daFool
Regular
Posts: 15
Joined: Mon Jul 05, 2004 12:47 pm
Contact:

Breaking serendipity with creative ways...

Post by daFool »

:cry: There are three serendipity installations on our server and two of them are now broken with ways beyond easy ("easy" as being easy for me) repair. And I'm quite at loss where to start looking for solutions.

We moved my wife's blog from old server to new one and upgraded from some 0.5 version to 0.6pl3. Now some readers complain that the text doesn't wrap correctly on IE or on Opera and they have to scroll horizontally to get it read. According to same sources this doesn't happen on my installation or on peikko's installation. Any ideas? My wife swears that she has not touched any files other than templates/default/style.css which I gave her fresh copy from my installation and it did not help. As I see it there are two explanations:
She has edited something else that breaks things and does not remember doing it or
the content of her blog and layout somehow breaks the IE and Opera in ways that don't happen on our other two blogs.

Any suggestions where to start to fix it?

I have broken my installation somehow. The plugin configuration screen no longer shows event plugins select at all. This is an error condition that is somehow related to the contents of the database. I tried doing fresh install from cvs and just copying uploads- and serendipity_config_local.inc.php from the old install to new one and it exhibits the same problem.

If I create a new database I get to see the event plugins select.

Then I tried to work around this by exporting/importing the entries from the old database to the new one but the import in the 200407261337 seems to be broken with postgresql. It just generates a bunch of syntax errors.

I also tried upgrading but it just results a blog that spews selects with missing attributes.

As I see it I have four viable options to fix this
1) Find out what it is in the database that breaks the plugins and fix it manually. Is there any documentation about database structure/tables I could use to get better grasp of the meanings of the tables and attributes?
2) Read the database upgrade scripts and try fix what causes the missing attributes and hope that this fixes the plugins' problem at the same time
3) Do a new installation of 0.6pl3 from scratch to a new database. Manually create all categories. Import entries from the old database. Copy uploads from the old directory to the new one. Remove old directory. Move new directory to the old directory. Try to fix what is broken in configuration because of the wrong path.
4) Create a new database manually. Create a export script that exports necessary items from the old database to a file and modifies filepaths on the fly if necessary. Create an import script that imports these necessary items from the file to the new database.

Any suggestions?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Breaking serendipity with creative ways...

Post by garvinhicking »

Hi!

About your wife's blog: This one destroys the layout because of the multiple images beside each other. She should add some linebreaks after every 3rd or 4th image, and IE/Opera should be fine then. An alternate approach is to modify the CSS layout to give a fixed width to the serendipity_entry container, so that automatic linewrapping can occur.

About your broken plugin installation: Please open the HTML source of the plugin page. At the bottom, I guess you will find a PHP error notice. What does it say?
Then I tried to work around this by exporting/importing the entries from the old database to the new one but the import in the 200407261337 seems to be broken with postgresql. It just generates a bunch of syntax errors.
Could you post the exact errors you are getting? This is quite important to us :-)
1) Find out what it is in the database that breaks the plugins and fix it manually. Is there any documentation about database structure/tables I could use to get better grasp of the meanings of the tables and attributes?
There's no real configuration, but you should look at serendipity_plugins table - it holds an easy list of all available plugins. Those with a prefixed '@' are internal plugins, the other ones external.

This way would be preferred. I think it's just a plugin causing some trouble, which you should be able to see within the HTML source...

Regards,
Garvin.
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
daFool
Regular
Posts: 15
Joined: Mon Jul 05, 2004 12:47 pm
Contact:

Post by daFool »

Your instructions got my wife's problem fixed. Thank you very much. You made my life a little bit easier and saved me trouble for installing whatever she would have wanted instead of serendipity. 8)
About your broken plugin installation: Please open the HTML source of the plugin page. At the bottom, I guess you will find a PHP error notice. What does it say?
Says nothing of sort. There is no error message just lone </tr> and source ends there.

But the error_log has the following:

Code: Select all

[client 10.0.0.19] PHP Notice:  A session had already been started - ignoring session_start() in /home/mos/public_html/blog/serendipity_admin_plugins.inc.php on line 6, referer: http://www.claymountain.com/~mos/blog/serendipity_admin.php
[client 10.0.0.19] PHP Notice:  Undefined variable:  commentar in /home/mos/public_html/blog/plugins/serendipity_plugin_comments/serendipity_plugin_comments.php on line 129, referer: http://www.claymountain.com/~mos/blog/serendipity_admin.php
[client 10.0.0.19] PHP Fatal error:  Call to a member function on a non-object in /home/mos/public_html/blog/serendipity_admin_plugins.inc.php on line 98, referer: http://www.claymountain.com/~mos/blog/serendipity_admin.php
Looking thru the plugins table I see plugins with same order field. I'll try editing the table directly.

I will get back to the postgres-errors with import a little bit later. Time just run out... :(
tomsommer
Core Developer
Posts: 240
Joined: Tue Sep 02, 2003 6:43 pm
Location: Denmark
Contact:

Post by tomsommer »

I think garvin fixed this in latest CVS.
Tom Sommer (Serendipity Core Developer)
http://blog.dreamcoder.dk
daFool
Regular
Posts: 15
Joined: Mon Jul 05, 2004 12:47 pm
Contact:

Postgresql errors

Post by daFool »

Looking thru the plugins-table I noted left over from failed experiment with weather plugin. After deleting it's row from the table the event plugin's select returned.
Could you post the exact errors you are getting? This is quite important to us
Not actually related and I don't know if it is fixed in the cvs-release but just in case. In statistics at 0.6pl3:

Code: Select all

Error in SELECT c.category_name, count(e.id) as postings FROM serendipity_category c, serendipity_entries e WHERE e.categoryid = c.categoryid GROUP BY e.categoryid ORDER BY postings DESC
ERROR: column "c.category_name" must appear in the GROUP BY clause or be used in an aggregate function array (
Export/import-case:
- Installed s9y_200407261337 as /serendipity
- Copied rss-feed link from serendipity 0.6pl3 (/blog) and gave it as import-feed to the /serendiptity

First I get the following...

Code: Select all

[client 10.0.0.19] PHP Warning:  pg_query(): Query failed: ERROR:  syntax error
at or near "DISTINCT" at character 914 in /home/mos/public_html/serendipity/serendipity_db_postgres.inc.php on line 56
[Wed Jul 28 10:50:08 2004] [error] [client 10.0.0.19] File does not exist: /home/mos/public_html/serendipity/entries, referer: http://www.claymountain.com/~mos/serendipity/
Then this message keeps repeating...

Code: Select all

[client 10.0.0.19] PHP Warning:  pg_query(): Query failed: ERROR:  null value in column "allow_comments" violates not-null constraint in /home/mos/public_html/serendipity/serendipity_db_postgres.inc.php on line 56, referer: http://www.claymountain.com/~mos/serendipity/serendipity_admin.php?serendipity[adminModule]=interop
And nothing gets imported.
Post Reply