Bad </td> formatting in Serendipity Administration Suite

Found a bug? Tell us!!
Post Reply
Mike_T
Regular
Posts: 6
Joined: Mon Sep 16, 2013 1:56 am

Bad </td> formatting in Serendipity Administration Suite

Post by Mike_T »

Hi

There is a minor HTML formatting bug in the code generated for the Serendipity Administration Suite entry page. The table row for the td colspan="2" id="serendipityAdminInfopane" data has a faulty end of row delimiter. Here is the section of HTML that is affected.

Cheers

Mike_T

<body id="serendipity_admin_page" onload="spawn()">
<table cellspacing="0" cellpadding="0" border="0" id="serendipityAdminFrame">
<tr>
<td colspan="2" id="serendipityAdminBanner">
<h1>Serendipity Administration Suite</h1>
<h2>Mike's Blog</h2>
</td>
</tr>
<tr>
<td colspan="2" id="serendipityAdminInfopane">
<span>Logged in as Mike_T (Administrator)</span>
</td>
<!--BUG missing '<' --> tr>
<tr valign="top">
<td id="serendipitySideBar">
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Bad </td> formatting in Serendipity Administration Suite

Post by Timbalu »

Which Serendipity Version? This is not missing in default, which is default/admin and /bulletproof/admin, btw.

Code: Select all

    <body id="serendipity_admin_page" onload="spawn()">
        <table cellspacing="0" cellpadding="0" border="0" id="serendipityAdminFrame">
             <tr>
                <td colspan="2" id="serendipityAdminBanner">
                      <h1>Serendipity Verwaltungsoberfläche</h1>
                      <h2>John Doe's personal blog</h2>
                </td>
            </tr>
            <tr>
                <td colspan="2" id="serendipityAdminInfopane">
                      <span>Angemeldet als John Doe (Administrator)</span>
                </td>
            </tr>
            <tr valign="top">
                <td id="serendipitySideBar">
See your template/admin/index.tpl to correct it.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Mike_T
Regular
Posts: 6
Joined: Mon Sep 16, 2013 1:56 am

Re: Bad </td> formatting in Serendipity Administration Suite

Post by Mike_T »

Hi Ian

Thanks for that info.

The version of serendipity I am using is from the "serendipity-1.7.3.zip" package. I haven't installed any extra plug-ins. I downloaded it yesterday and am now working through learning how to use it. I have done a fair bit of C and Java programming, have been coding with HTML for some time with a bit of javascript and have dabbled in PHP; so would be able to make my way around the serendipity code once I become familiar with it. My main reason for getting s9y was to get into webloging as a user rather than a developer. I just thought that I'd report the bug so that those more familiar with the code could improve the product.

My installation doesn't have a "template/admin/index.tpl" file. However it has a "\serendipity\templates\default\admin\index.tpl" file.

I just double checked, and it is not the initial Serendipity Administration Suite page that is affected, it is the page that is loaded when I click on the "New Entry" side-link. Any further pointers would be appreciated.

Cheers

Mike T
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Bad </td> formatting in Serendipity Administration Suite

Post by Timbalu »

But the fallback admin/index.tpl file has that closing </tr>, see
https://github.com/s9y/Serendipity/blob ... ex.tpl#L72

If I click on new entry, it is on right place also.
Maybe you need to purge the templates_c/default/some/more/dirs/aRandomNumber.file.index.tpl.php file or, at first, have a look into it, if it has that missing tag.
Which template do you use, btw?
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
onli
Regular
Posts: 2829
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Bad </td> formatting in Serendipity Administration Suite

Post by onli »

Thanks Mike. That code in the backend is indeed a mess and errors like the one you described are quite possible.

We are at the moment working on a new backend with modern html for serendipity 2.0, which will go into testing soon. I'm sure that the bug is fixed in there, as we got rid of the table layout.

If the bug doesn't affect your usage of that area, I'd suggest to just wait for that new version.
regards
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Bad </td> formatting in Serendipity Administration Suite

Post by Timbalu »

There is also a fallback to hardcoded markup in serendipity_admin.php, if no smarty is used or did not initiate (the else part of

Code: Select all

if (!$use_installer && !$_SESSION['no_smarty'] && serendipity_smarty_init()) {
).
But this also has the "missing" </tr> set, see
https://github.com/s9y/Serendipity/blob ... n.php#L355
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Mike_T
Regular
Posts: 6
Joined: Mon Sep 16, 2013 1:56 am

Re: Bad </td> formatting in Serendipity Administration Suite

Post by Mike_T »

Thanks People

I'm just using the default template Ian. The glitch is not affecting the performance of the page (as far as I can see anyway); so I'll just keep using it as is for now. As I get more familiar with the code and the code file anatomy I will be of more use to you in nailing down any bugs I come across. I'm "retired" now, so I should have plenty of time on my hands to fiddle 8) .

Cheers

Mike T
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Bad </td> formatting in Serendipity Administration Suite

Post by Timbalu »

Its still quite mysterious where you get that from... :wink:
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Mike_T
Regular
Posts: 6
Joined: Mon Sep 16, 2013 1:56 am

Re: Bad </td> formatting in Serendipity Administration Suite

Post by Mike_T »

Is there a UML map of s9y available so that I can see how it all fits together? If not, then perhaps I should make that my next project.

Mike T
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Bad </td> formatting in Serendipity Administration Suite

Post by Timbalu »

I don't think so, but I don't know if Garvin ever did that for the book, (see left on top).
Could be nice to have though! :)
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Bad </td> formatting in Serendipity Administration Suite

Post by garvinhicking »

Sadly not that I know of. :-(
# 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/
Mike_T
Regular
Posts: 6
Joined: Mon Sep 16, 2013 1:56 am

Re: Bad </td> formatting in Serendipity Administration Suite

Post by Mike_T »

Leave it with me. I'll study the documentation and the code over the next couple of months, and see if I can do a UML analysis. I have several other non-programming related projects on the go, and this will have to fit between them, but it will give me something to exercise my grey matter :-P

BTW, you can see a bit of my history at http://seismo.cqu.edu.au/CQSRG/staff/MikeT/details/

Cheers

Mike T
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Bad </td> formatting in Serendipity Administration Suite

Post by garvinhicking »

Hi Mike!

That sounds awesome! I'd love to see your results on this :-) Also feel free to ask for specifics, maybe we can help before you waste too much time on figuring it out ;)
# 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/
Mike_T
Regular
Posts: 6
Joined: Mon Sep 16, 2013 1:56 am

Re: Bad </td> formatting in Serendipity Administration Suite

Post by Mike_T »

No worries Garvin

I'm in the process of getting my head around the strange combination of OOP and procedural programming that is the PHP animal. Lots of global variables and lack of encapsulation - something I am not all that comfortable with (but getting used to) :-) Its almost as if PHP want's to be OOP, but can't make the commitment. The fact that it needs to intertwine with XHTML in a free fashion, as well as link in with databases (especially MySQL) in a non-OOP way, really precludes allowing it to be a pure OOP language. I accept that; but it makes it difficult to map the whole kit and kaboodle using UML. UML pretty much assumes that the components of the application are objects; which is certainly not the case with any of the PHP applications I have been looking at, including S9Y.

As I said, leave it with me while I internalise the code. Thanks for the invitation to call on your expertise when I get stuck (which I undoubtedly will do). I'll use this thread to call for a shoulder to cry on as that happens; but, I won't be beating at your door all the time - just when I simply can't understand what is going on. This is not something I will accomplish in a matter of weeks, but I'll keep at it and keep you informed from time to time how I am progressing.

Thanks for the support.

Cheers

Mike T
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Bad </td> formatting in Serendipity Administration Suite

Post by garvinhicking »

Hi!

Well, PHP stems from a script-based, functional world. Many developers use its easy-of-prototyping and develop functional functionality ;) which often remains inside the code, because it simply worked. OOP is not enforced in PHP, which is IMO a good thing and makes PHP somewhat unique. But with great power comes great responsibility, so more often than not those OOP/functional approaches collide with each other. Serendipity is a fine example for this; we do many things functionally, simply because it works that way from the start. We don't have the manpower to build a complete OOP approach, because one would have to rebuild everything from scratch that way.

That's actually also a reason why there is no PHP-blog system that has full functionality AND is perfectly implemented using OOP... ;)

I hope you'll have fun doing this, it sounds like you're about to. :-)

Best 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/
Post Reply