phpWebLog

find
story index | search | archive | submit story | downloads | stats | contact
Topics
  • General (912)
  • Announcements (20)
  • Development (518)
  • Mods & Hacks (33)


  • phpWebLog
  • Latest Release - 0.5.3 (BETA)
  • Latest Stable - 0.5.2
  • ChangeLog
  • TODO / Roadmap
  • BUGS

    CVS WEB

  • New XL fork 0.5.2
  • Unstable branch 0.5.3

  • For development discussions and for general support, join the phpWebLog mailing list

    phpWebLog needs active developers to help fix bugs. If you are interested, send me your SourceForge login information for CVS access.


    Last 5 Comments
  • Help, tried 3 different verisons... (pissed off)
  • Addon: top 5 of the month (Joe Skop)
  • Addon: top 5 of the month (Joe Skop)
  • Help, tried 3 different verisons... (Martin)
  • Addon: top 5 of the month (juling)


  • Polls seems broken
    Posted under Development by Neil Darlow on Friday October 19 2001 @ 10:27AM EDT
    Development With phpWebLog-0.5.2 when creating a new poll a couple of weirdnesses creep in.

    1) The answers are saved out-of-sequence
    2) The URLs in the browser entry bar have additional slashes

    Is there a patch somewhere to fix this behaviour?

    Regards,
    Neil Darlow M.Sc.

    < AvantGo Plug-In? | buttons >

    Neil Darlow writes on Sunday October 21 2001 @ 05:51AM EDT: [ reply | parent ]
    An Example:
    Question: Ask a question?
    Answer #1: Foo Bar
    Answer #2: Bar Baz
    Answer #3: Baz Foo
    is saved in T_PollAnswers as:
    ... 2 Bar Baz
    ... 3 Baz Foo
    ... 1 Foo Bar
    editing the poll with no changes and re-submitting saves:
    ... 3 Baz Foo
    ... 1 Foo Bar
    ... 2 Bar Baz
    and editing again with no changes and re-submitting saves:
    ... 1 Foo Bar
    ... 2 Bar Baz
    ... 3 Baz Foo

    Interestingly, the displayed order of the answers remained correct this time. I am confused as to why the ordering of records on T_PollAnswers should change at each submit.

    The additional slashes are added as follows:
    http://www.darlow.co.uk/admin/polls.php
    http://www.darlow.co.uk//admin/polls.php
    http://www.darlow.co.uk///admin/polls.php

    Configuration is: apache-1.3.20, mod_php4-4.0.6, mysql-3.23.42, phpweblog-0.5.2 on FreeBSD 4.4.

    Regards,
    Neil Darlow M.Sc.
    jason writes on Sunday October 21 2001 @ 03:45PM EDT: [ reply | parent ]
    Thanks for this report. Since polls were stripped out of 0.5.3 and made into an addon, this looks like a bug in the polls addon.
    Neil Darlow writes on Monday October 22 2001 @ 05:20AM EDT: [ reply | parent ]
    Are addons present in 0.5.2? The polls code in that version looks pretty tightly integrated.

    Regards,
    Neil Darlow M.Sc.
    jason writes on Monday October 29 2001 @ 12:27PM EST: [ reply | parent ]
    Nope, the addons are being introduced in the next version
    Neil Darlow writes on Monday October 22 2001 @ 09:07AM EDT: [ reply | parent ]
    The additional slashes being added to the URL was caused by the re-circulation of $PHP_SELF.
    I have stripped leading slashes from the URL with the following modification to F_pollVote in include/polls.inc.php.

    Replace:
    $VAR["Content"] .= F_admin("T_PollQuestions",$rid,$PHP_SELF);
    With:
    $VAR["Content"] .= F_admin("T_PollQuestions",$rid,substr($PHP_SELF,strspn($PHP_SELF,"/index.html")));

    Regards,
    Neil Darlow M.Sc.
    Neil Darlow writes on Monday October 22 2001 @ 10:29AM EDT: [ reply | parent ]
    The fix for random ordering of Poll Answers in the Poll Vote Block and Poll Edit Page seems to be a feature.

    Studying the MySQL documentation, it appears that PRIMARY KEYs don't specify ordering on INSERTS to the table.

    If you need deterministic ordering you must specify an ORDER BY in any select performed on the table.

    For the Polls in phpweblog-0.5.2 it's necessary to add an ORDER BY Aid to three places in include/polls.inc.php and one place in include/edit.php.

    I can provide a patch for both of these problems. Where should I send it?

    Regards,
    Neil Darlow M.Sc.
    Post a Comment
    Name:
    Email:
    URL:
      Remember my information (uses cookies)
      I would rather be anonymous
    Comment:
    * Your email will not be made public.
    Save As:

    SourceForge
    SourceForge is providing us a mailing list , documentation and a CVS tree.

    SourceForge Logo


    PHP.net
  • PHP 4.3.4RC2 released
  • Monthly PHP Magazine in French launched!
  • ApacheCon 2003, the Global Hub for All Things Apache
  • PHP 4.3.4RC1 released
  • php|cruise: The World's First Ever PHP-only Cruise
  • PHP Usage Survey Results
  • PHP Manual CHM Edition - 12th build
  • International PHP Conference 2003 program online
  • Server Central Donates Server
  • European Open Source Development Threatened!

  • PHPBuilder
  • On User-Defined Timezones in PHP
  • Dreamweaver MX 2004
  • Using PEAR's HTML_Table Class
  • An introduction to the ADOdb class library, Part 2
  • An introduction to the ADOdb class library for PHP
  • Manually Expiring Web Pages
  • Regression Testing With JMeter
  • Advanced Image Editing Under the GD Library
  • The Benefits of Using Objects with Databases
  • Interfacing with COM objects under Windows

  • phpWebLog: A PHP News and Content Management System
    Copyright (C) 2000-2002, Jason Hines / Eye Integrated Communications