Difference between revisions of "User talk:Alvonruff"

From ISFDB
Jump to navigation Jump to search
(→‎Interface - notes: new section)
(→‎Death's Head: new section)
 
(129 intermediate revisions by 23 users not shown)
Line 1: Line 1:
 
* [[User_talk:Alvonruff/Archive01]]
 
* [[User_talk:Alvonruff/Archive01]]
 
* [[User_talk:Alvonruff/Archive02]]
 
* [[User_talk:Alvonruff/Archive02]]
 +
* [[User_talk:Alvonruff/Archive03]]
  
 +
== MediaWiki ==
  
== The Dread Tomato Addiction ==
+
Hi.  I am responsible for a MediaWiki-based wiki for work, and in early 2020 I did a major upgrade from 1.16 to 1.34, which included having to upgrade MySQL, PHP, and a bunch of extensions. My environment is Windows, but from a MediaWiki point of view, I don't think underlying OS makes much difference.  I realize ISFDB's MediaWiki is even older than what I started with, but if I can help, answer questions, or experiment, let me know.  I'm happy to try to lend a hand.  --[[User:MartyD|MartyD]] 08:46, 1 January 2021 (EST)
We seem to have people verifying opposite ways: you for Essay, some for Shortfiction. Is there a standard for translating Contento's "Facetious Article" category? (I haven't got a copy, but it sounds such an intriguing title I might have to get one!) [[User:BLongley|BLongley]] 16:18, 13 Oct 2007 (CDT)
 
  
== Recent Integriations changes? ==
+
: So I might as well start with a current accounting of everything. My notes (from May 2014) from a previous attempt to move to MediaWiki 1.22 (that I never finished) showed that we needed to do the following:
  
It looks like submission IDs are no longer hyperlinked from the [http://www.isfdb.org/cgi-bin/mod/recent.cgi?0+I Recent Integration pages] with the exception of Author Updates that are still working fine. Was that "software rot", an accident or was there a problem with Publication Views? [[User:Ahasuerus|Ahasuerus]] 18:03, 15 Oct 2007 (CDT)
+
* Move to SQL 5.0.2 or later. We were on 5.0.45 at that time (and we still are)
 +
* Move to PHP 5.3.2 or later. We were on 5.2.4 at that time (and we still are)
  
== "ExPat Error" on two submissions ==
+
I have the following packages/add-ons laying around in my home directory at the ISFDB:
  
Al, when you get a chance could you zap these submissions? [http://www.isfdb.org/cgi-bin/mod/pv_update.cgi?865173 865173] and [http://www.isfdb.org/cgi-bin/mod/pv_update.cgi?865185 865185]. I was copying-and-pasting an HTML note in a series of submissions, and mistakenly placed it into the wrong field, then stupidly submitted it. And to prove that I could not have made such a stupid mistake, I did it again. Right now the submission page looks like a mess. Thanks. [[User:Mhhutchins|Mhhutchins]] 15:39, 5 Nov 2007 (CST)
+
* mediawiki-1.12.0rc1.tar (original Mediawiki version)
 +
* ImageMagick-6.4.1-8.i386.rpm
 +
* highlight-2.6.10
 +
* geshi-1.0.7.21.tar
 +
* SyntaxHighlight_GeSHi.class.php
 +
* SyntaxHighlight_GeSHi.i18n.php
 +
* SyntaxHighlight_GeSHi.php
  
:These were dumped long ago, but I did modify the submission list app to not look like a mess when an XML error occurs, and I also made it possible (for pv_update and pv_new for now) to look at mangled submissions and reject them. [[User:Alvonruff|Alvonruff]] 11:58, 30 May 2008 (UTC)
+
The following extensions are installed in wiki/extensions:
  
== Dark Horse vs. Dissembler ==
+
* ConfirmEdit
 +
* SyntaxHighlight_GeSHi
 +
* SVGtag.php
  
The other night I was cleaning up the [http://www.isfdb.org/cgi-bin/pe.cgi?1278 Aliens] series and noticed that Dissembler had failed to grab novels #13 (John Shirley's ''Steel Egg'') and #14 (S. D. Perry's ''Criminal Enterprise'') in the series. I then noticed that both books were published by "Dark Horse", a well known comics publisher, so I wondered if Dissembler was configured to ignore everything with the string "Dark Horse" in the publisher field. If so, then I suspect that we may be missing additional novels. At first any books published by "Dark Horse Comics" appeared as by their subsidiary [http://en.wikipedia.org/wiki/DH_Press DH Press], but apparently some of their recent titles have been cataloged by Amazon (and other online catalogs) as having been published by "Dark Horse".
+
Moving PHP is easy, because nothing else on our system relies on it. Looks like MySQL 5.5.8 is required for the latest version of MediaWiki. I'm running 8.0.22 on my fresh install at home, and I am seeing errors on all pages with incorrect date values. I'm not exactly done with my installs, so some of these might be artifacts of some other issues, but there are some notes/queries elsewhere in our wiki about date format issues while using later versions of MySQL.
  
Assuming my hypothesis is correct, the missing titles should be easy to identify since they have a [http://www.dhpressbooks.com/index.php complete catalog of their novels online], but we will probably want to fix Dissembler as well. [[User:Ahasuerus|Ahasuerus]] 19:48, 21 Dec 2007 (CST)
+
If a MySQL move is required to get to the new MediaWiki, then obviously we need to move the ISFDB along as well. So that seems like the first step to me. [[User:Alvonruff|Alvonruff]] 14:15, 1 January 2021 (EST)
  
:Dark Horse is definitely in the dissembler black list as a comic publisher. Is the fix to take Dark Horse off the list, or are there different imprints for novels vs comics? [[User:Alvonruff|Alvonruff]] 06:11, 22 Dec 2007 (CST)
+
: I have been running MySQL 5.5.17 on my development server for the last 6 years or so. I have encountered only one problem so far. A particularly tricky SQL query ran fine under 5.5.17, but it hung on the production server. I had to break up the query into two separate queries for it to work. Based on my experience with it, we should be able to upgrade the production version to 5.5.17 without running into any issues. [[User:Ahasuerus|Ahasuerus]] 17:03, 1 January 2021 (EST)
  
::Well, the underlying problem appears to be that Dark Horse has now branched out into media-related SF novels. Although in theory all of their fiction is supposed to appear as by "DH Press", at least some of it is listed (by Amazon.com and other online sources) as by "Dark Horse", so there is no easy way of telling whether a particular title is a novel or a comic. Unfortunately, they still produce an awful lot of comics, so if we removed them from the black list we would end up with a lot of bad data in the database or at least a lot of bad Dissembler-generated submissions.
+
::I'm running MySQL 5.7.29 with MediaWiki 1.34 and PHP 7.4.4 at the moment. (I have not done the 1.34 -> 1.35 update yet). I did not have any MySQL problems but did have some PHP-related issues where behaviors, packages/functions, and defaults have changed. And then MediaWiki itself needs different syntax and different packages/settings in LocalSettings.php.  I recall having to do the upgrade in multiple steps (I thought I had to do something like get to 1.27 first, then from there go to 1.34), but the UPGRADE information seems to suggest being able to convert directly from 1.1x to 1.35.  If you'd like, I can get my environment up to snuff for 1.35 and then try upgrading a recent dump and see what happens.  DB upgrade will probably take hours.  I could also see what's up with those three extensions.  --[[User:MartyD|MartyD]] 08:02, 2 January 2021 (EST)
  
::One reasonably reliable way of distinguishing between Dark Horse's comics and novels is the price. Their novels are, AFAIK, all mass market paperbacks and priced at $6.99, although I assume they will move on to $7.99+ eventually. Their comics, on the other hand, are usually $14.95+, sometimes $10.99. Would it be feasible to change the blacklisting condition to something like "If the Publisher contains the string 'Dark Horse' '''and''' the price is over $9.90, then do not create a submission"? If not, then we could keep the publisher blacklisted, but periodically check PH Press' online catalog. [[User:Ahasuerus|Ahasuerus]] 17:06, 22 Dec 2007 (CST)
+
:::That would be awesome, given you've already done this before. Do you need a current listing of LocalSettings.php ? [[User:Alvonruff|Alvonruff]] 16:40, 2 January 2021 (EST)
  
:::Not a problem. Dissembler already uses price heuristics to weed out box displays. [[User:Alvonruff|Alvonruff]] 06:42, 23 Dec 2007 (CST)
+
::::I'm happy to help with the extensions and LocalSettings.php, as I have experience with those where I work (I maintain several different wikis, and have updated them multiple times now). I'd need to have admin access via command line, though, as that's how I know how to do things. :) ···[[User:Nihonjoe|<font color="darkgreen">日本穣</font>]] · <small>[[Special:Contributions/Nihonjoe|<font color="blue">投稿</font>]] · [[User talk:Nihonjoe|Talk to Nihonjoe]]</small> 12:23, 4 January 2021 (EST)
  
:::Excellent! Now we just need to get them to promise that they will never ever do trade paperbacks :) [[User:Ahasuerus|Ahasuerus]] 13:55, 23 Dec 2007 (CST)
+
:::::@Al: Yes, if you could send me the LocalSettings.php, that would be great.  You can XXXX out the database credentials -- I will use my own -- and I don't think there is anything else sensitive in there.  You might need to zip it or rename it to ".txt" to get it through any mail filtering.  --[[User:MartyD|MartyD]] 14:38, 6 January 2021 (EST)
  
== EditBug 10092 back? Code reversion? ==
+
== Ongoing work on HTTPS-Support of ISFDB ==
 +
I'm currently in contact with [[User_talk:Ahasuerus|Ahasuerus]] who is working on conversion [http://www.isfdb.org ISFDB] the python code to configure/enable HTTPS ([https://sourceforge.net/p/isfdb/feature-requests/1298/ #1298 Support HTTPS]). Which is somewhat a bigger task, I thought at the beginning, doing it right.
  
I removed all page numbers from a [http://www.isfdb.org/cgi-bin/pl.cgi?252241 newly cloned Publication], but when I approved my submission, all page numbers were still there. This bug (EditBug 10092) is marked as "fixed" on the [[ISFDB Bug List]], so I wonder if we may have accidentally gone back to a prior version of the software? [[User:Ahasuerus|Ahasuerus]] 17:47, 25 Dec 2007 (CST)
+
I'm currently running my own HTTPS-implementation of HTTPS on a local server, using newest MariaDB, MediaWiki 1.36, Apache 2.4. Upgrading [http://www.isfdb.org ISFDB] to a similar setting requires OS-Updates, including MySQL and other upgrades (as mentioned above).
  
:Was this during the cloning process or editing the clone once it existed? I've tried this while cloning numerous pubs at home and did one test case on the live system, and verified that the cloning tool doesn't generate cPage tags if the fields are blank (and also verified that empty cPage tags are generated when editing a pub). During moderation the cloning approval tool only adds page information if the cPage tag is present (which it wasn't), and the pub editing tool only modifies page information if a cPage tag is present (which it was). At this point I'm not sure how to reproduce the issue - perhaps something peculiar to that particular publication? [[User:Alvonruff|Alvonruff]] 06:49, 26 Dec 2007 (CST)
+
I won't go into detail here, but [[User_talk:Ahasuerus|Ahasuerus] asked to jump into the current discussion. There is currently a need for the system administrator, who is responsible for the server (upgrading...) --[[User:Elsbernd|elsbernd]] 06:25, 28 November 2021 (EST)
  
::I had cloned a much larger omnibus that needed to be Unmerged and pruned based in part on page numbers, so I didn't delete them during the cloning process. The problem is that I can't delete the page numbers from the resulting publication -- the submission looks OK on the Approval page with all the page numbers getting changed to "-", but when I approve it, the resulting SQL is only 3 lines long and the page numbers are not deleted. It's recreatable, give it a try and you will see. [[User:Ahasuerus|Ahasuerus]] 11:43, 26 Dec 2007 (CST)
+
: I have moved the discussion from my Talk page to [[Development/HTTPS]]. I plan to add a list of identified dependencies next. [[User:Ahasuerus|Ahasuerus]] 16:28, 28 November 2021 (EST)
  
== Empty series deletion ==
+
:: I have created a list of dependencies and sent Al an e-mail. [[User:Ahasuerus|Ahasuerus]] 18:15, 28 November 2021 (EST)
  
One of the things that we can't do at this time is delete empty series. If I recall your explanation of the difficulties surrounding auto-deletion of empty series correctly, the problem was with nested series where the deletion of the last entry in a deeply nested series would suddenly make the whole series hierarchy subject to deletion, which wasn't easy to implement.
+
== 2022-03-05 performance issues -- a DDOS attack? ==
  
I assume that these considerations still apply, but I wonder if it would be possible to implement a palliative solution, i.e. a new option on the navbar that would allow editors to delete the displayed series. Naturally, the logic would first check to see whether the series was empty, but it wouldn't check whether the empty series' superseries. Thus, our editors would have to do a couple of submission cycles to get rid of empty nested series, but it would be a huge improvement over the current situation.
+
Our current performance issues may be due to a DDOS attack -- see [http://www.isfdb.org/wiki/index.php/ISFDB:Community_Portal#2022-03-05_performance_issues these findings for details]. Would you happen to have any ideas? [[User:Ahasuerus|Ahasuerus]] 13:16, 5 March 2022 (EST)
  
The reason I am asking is that we have accumulated quite a few empty series after multiple cleanup projects and sub-projects. At this point Dragonlance alone has a couple of empty series, so any relief would be welcome :) [[User:Ahasuerus|Ahasuerus]] 20:24, 25 Dec 2007 (CST)
+
== SQLloadNextSubmission error ==
  
== Python error approving an e-book ==
+
I am trying to recreate the SQLloadNextSubmission error that you ran into on my development server. A couple of questions to make sure that we are on the same page:
  
I have received the following Python error when approving [http://www.isfdb.org/cgi-bin/mod/dumpxml.cgi?928315 this submission]:
+
* Did you create your test user using "scripts/create_user.py" as per [http://www.isfdb.org/wiki/index.php/ISFDB:Personal_Linux_Website#Enable_ISFDB_Editing Enable ISFDB Editing]?
 +
* Did you use the latest SVN version of [https://sourceforge.net/p/isfdb/code-svn/HEAD/tree/trunk/scripts/create_user.py scripts/create_user.py]?
  
<pre>
+
[[User:Ahasuerus|Ahasuerus]] 16:16, 5 March 2022 (EST)
SQL Updates:
 
  
    * insert into pubs(pub_title) values('xxx');
+
:Yes to both. I do only have exactly 1 user on the system. The observed error is:
    * update pubs set pub_title='Gulliver of Mars' where pub_id=255979
 
    * update pubs set pub_tag='GLLVRFMRST1996' where pub_id=255979
 
    * update pubs set pub_year='1996-07-01' where pub_id=255979
 
    * update pubs set pub_ptype='ebook' where pub_id=255979
 
    * update pubs set pub_ctype='NOVEL' where pub_id=255979
 
    * update pubs set pub_isbn='#604' where pub_id=255979
 
    * update pubs set pub_price='$0.00' where pub_id=255979
 
    * update pubs set note_id='127941' where pub_id=255979
 
    * select publisher_id from publishers where publisher_name='Project Gutenberg';
 
    * update pubs set publisher_id='13741' where pub_id=255979
 
    * insert into pub_authors(pub_id, author_id) values('255979', '738'); --> -->
 
     
 
     
 
      AttributeError Python 2.4.2: /usr/local/bin/python
 
      Tue Feb 12 14:11:52 2008
 
  
       A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
+
    Traceback (most recent call last):
      /www/isfdb.tamu.edu/root/cgi-bin/mod/ca_new.cgi
+
       File "/usr/lib/cgi-bin/mod/submission_review.cgi", line 44, in &lt;module&gt;
        492        print "<hr>"
+
         ApproveOrReject('%s.cgi' % submission_filer, submission_id)
        493
+
      File "/usr/lib/cgi-bin/mod/common.py", line 110, in ApproveOrReject
         494        Record = DoSubmission(db, submission)
+
        PrintSubmissionLinks(submission_id, reviewer_id)
        495
+
      File "/usr/lib/cgi-bin/mod/common.py", line 127, in PrintSubmissionLinks
        496        print "<hr>"
+
         next_sub = SQLloadNextSubmission(submission_id, reviewer_id)
      Record undefined, DoSubmission = <function DoSubmission>, db = <_mysql.connection open to 'localhost' at 836c00c>, submission = 928315
+
      File "/usr/lib/cgi-bin/mod/SQLparsing.py", line 2139, in SQLloadNextSubmission
      /www/isfdb.tamu.edu/root/cgi-bin/mod/ca_new.cgi in DoSubmission(db=<_mysql.connection open to 'localhost' at 836c00c>, submission=928315)
+
         db.query(query)
         371                        artists = doc.getElementsByTagName('Artist')
+
    ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'groups\n
        372                        for artist in artists:
 
         373                                data = XMLunescape(artist.firstChild.data.encode('iso-8859-1'))
 
        374                                addPubArtist(data, Record)
 
        375
 
      data = 'Edwin L. Arnold', global XMLunescape = <function XMLunescape>, artist = <DOM Element: Artist>, artist.firstChild = None, artist.firstChild.data undefined
 
  
      AttributeError: 'NoneType' object has no attribute 'data'
+
: I changed PrintSubmissionLinks to:
            args = ("'NoneType' object has no attribute 'data'",)
 
</pre>
 
  
Something about the artist field? The submission is currently on hold. [[User:Ahasuerus|Ahasuerus]] 14:15, 12 Feb 2008 (CST)
+
        try:
 +
                next_sub = SQLloadNextSubmission(submission_id, reviewer_id)
 +
        except:
 +
                next_sub = 0
  
:I just tried re-approving it and received the same error. The semi-approval seems to create orphan Publication records with no Title record. [[User:Ahasuerus|Ahasuerus]] 00:42, 15 Feb 2008 (CST)
+
: But there is another failure case when SQLloadNextSubmission actually succeeds, and there is a next_sub, but I need to figure out the steps to get there. {{unsigned|Alvonruff}}
  
== Python Error on Recent Integrations ==
+
:: According to the error message above, it's a syntax error in the following SQL query:
  
It seems to be with Submission 929307 - no doubt it'll drop off shortly, so not a major worry. [[User:BLongley|BLongley]] 15:27, 14 Feb 2008 (CST)
+
        query = """select * from submissions s
Here's what I saw though:
+
                where s.sub_state = 'N'
+
                and s.sub_holdid = 0
<pre>
+
                and s.sub_id > %d
UnboundLocalError Python 2.4.2: /usr/local/bin/python
+
                and not exists (
Thu Feb 14 15:23:46 2008
+
                        select 1 from mw_user u, mw_user_groups groups
 +
                        where s.sub_submitter != %d
 +
                        and s.sub_submitter = u.user_id
 +
                        and u.user_id = groups.ug_user
 +
                        and groups.ug_group = 'sysop'
 +
                        )
 +
                order by s.sub_reviewed
 +
                limit 1""" % (int(sub_id), int(reviewer_id))
  
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
+
:: Would it be possible to use Python's "print" statements to display the values of "sub_id" and "reviewer_id" before the query is executed?
/www/isfdb.tamu.edu/root/cgi-bin/mod/recent.cgi
 
  138        color = 0
 
  139        while record:
 
  140                PrintRecord(record, color)
 
  141                color = color ^ 1
 
  142                record = result.fetch_row()
 
PrintRecord = <function PrintRecord>, record = ((929307L, 'I', 21L, '<?xml version="1.0" encoding="iso-8859-1" ?>\n<Is.../AwardLevel>\n </AwardUpdate>\n</IsfdbSubmission>\n', datetime.datetime(2008, 2, 14, 12, 46, 18), datetime.datetime(2008, 2, 14, 12, 49, 19), 2L, 2L, None, 0L),), color = 0
 
/www/isfdb.tamu.edu/root/cgi-bin/mod/recent.cgi in PrintRecord(record=((929307L, 'I', 21L, '<?xml version="1.0" encoding="iso-8859-1" ?>\n<Is.../AwardLevel>\n </AwardUpdate>\n</IsfdbSubmission>\n', datetime.datetime(2008, 2, 14, 12, 46, 18), datetime.datetime(2008, 2, 14, 12, 49, 19), 2L, 2L, None, 0L),), eccolor=0)
 
  86                        submitter = 'unknown'
 
  87        approver = SQLgetUserName(record[0][7])
 
  88        print '<td><a href="http://isfdb.org/wiki/index.php/User:%s">%s</a></td>' % (submitter, submitter)
 
  89        print '<td><a href="http://isfdb.org/wiki/index.php/User:%s">%s</a></td>' % (approver, approver)
 
  90        print "<td><i>%s</i></td>" % (subject[:40])
 
submitter undefined
 
  
UnboundLocalError: local variable 'submitter' referenced before assignment
+
::: submission_id = 5243522 (same as the argument to the cgi script), reviewer_id = 2
      args = ("local variable 'submitter' referenced before assignment",)
 
</pre>
 
  
:Are you still seeing this? Works fine for me. Disturbing because I fixed this problem (displaying recent AwardUpdate and AwardDelete) early this morning, but the submission was over lunch, and no changes have been made since. [[User:Alvonruff|Alvonruff]] 19:17, 14 Feb 2008 (CST)
+
:: Also, when you say that you have only 1 user in the database, do you mean that you are not using the publicly available backups? Or did you truncate mw_user after installing them? [[User:Ahasuerus|Ahasuerus]] 18:28, 5 March 2022 (EST)
  
::: Yes, I'm still seeing it, but only for that submission. Which is 3 pages back now so no worry really. [[User:BLongley|BLongley]] 13:00, 15 Feb 2008 (CST)
+
::: No, the mw_user table has 1,977,439 entries in it. The mw_user_groups table, which control the editing permissions was empty in the backup, so it now has two entries for me. Since I was already present in mw_user, I modified the create_user.py script to not insert me again into that table, and let it do all the password stuff, and then add the two entries into mw_user_groups (sysop and bureaucrat).
  
== Potential enhancements to Coverart pages ==
+
:::: What MySQL version are you using?  "GROUPS" is a reserved word as of 8.0.2 per https://dev.mysql.com/doc/refman/8.0/en/keywords.html#keywords-8-0-detailed-G [[User:ErsatzCulture|ErsatzCulture]] 19:24, 5 March 2022 (EST)
  
I know there are some potential modifications to Editor and Coverart processing but I would like to know if a potential variant record method is technically feasible and consistent with potential changes. The quick story - some editors would like to document the fact that cover art is for a particular magazine story. One method would be to modify the Coverart record which is system generated upon original entry of the magazine. Some of us oppose that. The first paragraph of [http://www.isfdb.org/wiki/index.php/Rules_and_standards_discussions#Linking_Cover_illustrations_to_the_stories_they_illustrate this entry] has the technical details for another methodology which also has at least one negative display aspect. Are there any technical aspects we need to keep in mind for either method before we discuss this issue into infinity?--[[User:Swfritter|swfritter]] 20:28, 14 Feb 2008 (CST)
+
::::: That will do it, thanks! Let me change it to something else... [[User:Ahasuerus|Ahasuerus]] 19:51, 5 March 2022 (EST)
  
== Thanks for the new tools! ==
+
:::::: Done, although the [https://dev.mysql.com/doc/refman/8.0/en/keywords.html list of recently added MySQL reserved words] is so long that I wouldn't be surprised if we ran into something else during testing. [[User:Ahasuerus|Ahasuerus]] 20:20, 5 March 2022 (EST)
  
I've no idea what you intend them for, but I've done a little bit of regularisation, e.g. there's no reason to record "St Albans" against Panther books, even though City/Town of publisher might be useful for foreign titles. It's also shown up a few misuses (IMO) of the field for printing numbers, variant titles, etc. If you have a long-term plan for publishers and imprints feel free to state it - if not, I'll go add known ISBN ranges, dates the imprint was used for, when a publisher became an imprint, who owned what in what years, etc, to publisher pages. Eventually - at the moment I'm just looking at the sub-zero temperatures predicted here for the next few days and thinking about finally USING the work lap-top in the nice warm bedroom... [[User:BLongley|BLongley]] 19:07, 16 Feb 2008 (CST)
+
== Python 2.7 ==
  
== Date Ranges? ==
+
I am not sure how much it may help with Linux, but here is what I have been running on my Windows 10 development server for the last few days:
When you have a chance, please take a look at [[ISFDB:Community Portal#"Unknown, but after X" dates]]. Would implementing date ranges, either a limited special purpose (point in time -> later) range, or a more general full-function date range (for publication dates, and possibly other dates such as birth and death dates) be excessivly hard to do? -[[User:DESiegel60|DES]] <sup>[[User talk:DESiegel60|Talk]]</sup> 12:45, 25 Feb 2008 (CST)
 
  
== Another Python Error ==
+
* Python 2.7.18 -- https://www.python.org/ftp/python/2.7.18/python-2.7.18.msi -- found [https://www.python.org/downloads/release/python-2718/ here]. Note that it's the 32-bit version of Python. The 64 version apparently doesn't work with MySQLdb.
 +
* MySQLdb 1.2.4 -- https://sourceforge.net/projects/mysql-python/files/mysql-python/1.2.3/MySQL-python-1.2.3.win32-py2.7.msi/download -- which is explicitly compatible with Python 2.7.18.
 +
* MySQL 5.5.17. I have been running this version of MySQL for a number of years and have come across only one backward compatibility issue. A SQL query which successfully ran under 5.5.17 hung on the live server. I had to break it up into 2 queries, which was not a big deal.
  
I suspected it was because I did a Publication search for "47", and one of those publications has a Tag of "472005", presumably as it was published in 2005. This could of course be interpreted as a record number rather than a Tag.
+
I am in the process of testing every Web page and every ISFDB process on my development server. Hopefully everything will check out. The current Python code does a number of funky things like occasionally redefining "id" and "type" and it's possible that Python 2.7 may be less tolerant of that level of abuse. We should find out soon enough. [[User:Ahasuerus|Ahasuerus]] 18:46, 6 April 2022 (EDT)
But the error seems to occur on the NEXT record? (68940 rather than 68749 - 103581 seems normal, for those that think "Патруль Звездных Волков" is normal. [[User:BLongley|BLongley]] 16:03, 4 Mar 2008 (CST)
 
  
: Beginning of the record 68940 is displayed OK, but then ctype is null:
+
:Python2.7 does seem to be the likely culprit (more so than MySQL itself). I'll be installing 2.5, and that will tell me where the problem lies. [[User:Alvonruff|Alvonruff]] 06:04, 7 April 2022 (EDT)
<pre>
 
mysql> select pub_ctype from pubs where pub_id = 68940;
 
+-----------+
 
| pub_ctype |
 
+-----------+
 
| NULL      |
 
+-----------+
 
1 row in set (0.00 sec)
 
</pre>
 
: No conversion from NULL to string? --[[User:Roglo|Roglo]] 16:27, 4 Mar 2008 (CST)
 
  
:: I should mention, perhaps, that I was trying a publisher search first: "http://www.isfdb.org/cgi-bin/publisheryear.cgi?3473+2005", and clicking on the ISBN resulted in "pl.cgi: No such publication tag exists." error. I only got the big purple error later. [[User:BLongley|BLongley]] 16:34, 4 Mar 2008 (CST)
+
:I'm curious why Python 2.7 is being used for the upgraded site. Wouldn't it be better to switch to a newer version, like 3.8, or even 3.10, especially since 2.7 reached EOL in 2020? ···[[User:Nihonjoe|<font color="darkgreen">日本穣</font>]] · <small>[[Special:Contributions/Nihonjoe|<font color="blue">投稿</font>]] · [[User talk:Nihonjoe|Talk to Nihonjoe]]</small> 13:07, 9 May 2022 (EDT)
  
== Python error when trying to display a magazine with duplicate entries ==
+
:: Unfortunately, Python 3.x, unlike Python 2.7.x, is not backward compatible with Python 2.5.x. [[User:Ahasuerus|Ahasuerus]] 13:30, 9 May 2022 (EDT)
 +
:::That's true, but since so much of the site is being rewritten and redone, wouldn't it be better for the future to redo any Python used on the site to use Python 3.x? ···[[User:Nihonjoe|<font color="darkgreen">日本穣</font>]] · <small>[[Special:Contributions/Nihonjoe|<font color="blue">投稿</font>]] · [[User talk:Nihonjoe|Talk to Nihonjoe]]</small> 13:35, 9 May 2022 (EDT)
 +
::::I am sure we would all like to move to Python3, however, that would entail many changes (which could be done and probably should be however these are fraught with issues and thus will take significant time to untangle). For example, the website is serving pages in Latin1 (not UTF-8) and I believe the database is storing strings that way too. We get Unicode support by allowing HTML entity coding in said strings. It is quite ugly but it works. Strings in Python2 are basically binary strings (although in late versions there is also a "unicode" string type). In Python3 all strings are Unicode (though not UTF-8; there is a PEP for the encoding someplace) but there is also a "bytes" type which is basically a binary string (as well as a mutable "bytearray" type). We would likely want to update the database to use UTF-8 strings and get the website to serve UTF-8 and get rid of all the HTML entity encodings for for non-Latin1 content but updating all the Python, JavaScript and SQL code to handle such is a nontrivial undertaking. Could we move to Python3 keeping our currently encoding mess? Maybe but I am not sure it is worthwhile. —[[User:Uzume|Uzume]] ([[User talk:Uzume|talk]]) 01:54, 7 September 2022 (EDT)
  
A New Magazine submission resulted in a messed up pub record with all Contents level Titles duplicated. It also errors out when you [http://www.isfdb.org/cgi-bin/pl.cgi?FANTASYBKMAR1984 try to look at it], but you can pull it up in the edit form and the Remove Title form. [[User:Ahasuerus|Ahasuerus]] 18:04, 8 Mar 2008 (CST)
+
:::::There are three pretty big issues moving to Python 3:
:I've straightened it out. Ahasuerus' message above about "Remove Title" sent me in the right direction. After removing the content that had no author (Waiting), the Python error disappeared.  Then all I had to do was remove the duplicates and merge the title records that were duplicated by the submission. Thanks. [[User:Mhhutchins|MHHutchins]] 18:20, 8 Mar 2008 (CST)
+
:::::* The primary function of the isfdb is to gather information from MySQL, and then organize, format, and print that data. Since the fundamental data type for strings is different in Python 3, and the methods for printing are different (including the syntax of those methods), all of the formatting/output code of the isfdb code would require rewrites - and that's the vast majority of the isfdb. There are some automated tools to help in such a conversion, but I haven't tried those as yet.
 +
:::::* The current connector between MySQL and the ISFDB only works on Python 2.X. Moving to Python 3 requires moving to a new connector (most likely the connector produced by MySQL). That connector uses a different paradigm for the storage of queries, so all of SQLparsing.py would require a rewrite. I have done experiments with Python 3 and the new connector, and have written up how to convert our current SQL design patterns into the new connector requirements, but our SQL code isn't isolated to just SQLparsing.py (we have a ton of support scripts that would also need conversion).
 +
:::::* As Uzume discussed above, the character set problem is probably the biggest issue of all, and was the single biggest issue in the modernization project this year (see [[User:Alvonruff/The Charset Problem]]). Since python and the connector both have charset changes, we would almost certainly attempt to simplify the charset problem by moving to the unicode standard (which we absolutely should do at some point), which would require converting all of the data resident in MySQL (as in we would need to write conversion tools to pull every line of data out of MySQL, convert it from the current mish-mash of Latin1+Other Stuff into unicode), and then write it back into MySQL. This part of the project comes with a super-crazy amount of risk.
  
== Newbery Medal winners ==
+
:::::On a scale of 1 to 10, I would put the difficulty of this year's modernization project at a 2 or 3, and we started that at the beginning of the year, and still haven't quite completed that project. That said most of the changes we did for the modernization project were configuration changes, and a smattering of single-line code additions, not a rewrite. I estimate the difficulty of a python 3 conversion to be more like a 7 or 8, and may take more than a year to complete. I've done some experimentation for a python 3 move, and will likely use the isfdb2 staging server for that project next year. But we were out of time due to the hosting change, which put python 3 out of scope for this year.
  
While obviously not an SF award, we have at least 9 winners of the [http://www.ala.org/ala/alsc/awardsscholarships/literaryawds/newberymedal/newberywinners/medalwinners.cfm Newbery Medal] in the DB (although one is problably not SF) See hte list via [http://www.isfdb.org/cgi-bin/tag.cgi?3117 this tag]. Do we want to add this to our awards list? -[[User:DESiegel60|DES]] <sup>[[User talk:DESiegel60|Talk]]</sup> 10:58, 22 Mar 2008 (CDT)
+
:::::It's really on the Python team for breaking compatibility between 2.X and 3.X. I'm sure there were fabulous reasons for doing so, but the barrier to entry for 3.X is causing widespread delays in its adoption. For instance, in the 3D printer community, the most modern firmware available is Klipper, which is still on Python 2.X, as moving to 3.X is a massive undertaking. Most teams are making decisions on whether they want to burn their limited volunteer time on doing new features, or on trying to move to the latest version of Python. In my mind, there have been two major versions of the ISFDB: the first was the non-database version written in C, with the indices compiled for online use, and the second was the move to python/MySQL. Moving to python 3 is such a large project, that I consider that to be the next major phase of the ISFDB, as it would be mostly a rewrite of everything. [[User:Alvonruff|Alvonruff]] ([[User talk:Alvonruff|talk]]) 07:10, 7 September 2022 (EDT)
  
== Publisher Stuff ==
+
::::::We are far from the only ones so affected (e.g., [https://github.com/renpy/renpy Ren'Py] used to use [https://github.com/pygame/pygame/ pygame] mostly for its SDL binding but they needed to move from SDL1 to SDL2; pygame moved but also moved to Python3 so Ren'Py created its own SDL2 binding for Python2 until it can be migrated, however, migrating to Python3 is complex since Python2 is exposed to users of Ren'Py necessitating a major breaking change). That said, this has been coming for a very long time and we could have been more proactive to not let ourselves get put into the position we are not in, e.g., Python has had a Unicode string type since 2.0 (introduced with [https://peps.python.org/pep-0100/ PEP 100]; 2.0 was released 2000-10-16). Regardless, we are here now and it is a major issue that will take significant work to fix. As Al said, we will likely have to do a major database conversion (effectively making a new Unicode database based upon the current pseudo-Unicode one). That will necessitate significant changes to the codebase. I might make more sense to consider rewriting the code. For example, make a script to convert the database and then a Python3 access code and keep the current Python2 for database changes until we can get a new submission and moderator interfaces developed, etc. (i.e., the new Python3 would likely start as just a database viewer and the database would have to get say period updates converted from the current one, etc. until a full switch over could be made.). —[[User:Uzume|Uzume]] ([[User talk:Uzume|talk]]) 15:00, 12 September 2022 (EDT)
  
I see you're doing something interesting with "Top 100" at the moment, but when you get a chance can you look at [http://www.isfdb.org/wiki/index.php/Talk:Publishers#Publisher_Naming_Standards my initial thoughts on the Publisher capabilities] you added recently? If you can't read it all, then 1.8 and 8.1 are sort of possible Bug reports. [[User:BLongley|BLongley]] 15:22, 27 Mar 2008 (CDT)
+
::::::: Moving from HTML-encoded characters to UTF-8 is clearly beneficial because it will allow proper searching and other functional improvements. However, it can be done under Python 2.7. What are the benefits of moving to Python 3? [[User:Ahasuerus|Ahasuerus]] ([[User talk:Ahasuerus|talk]]) 18:05, 12 September 2022 (EDT)
  
Nobody's really stated a long term goal for what we do with the tools you've given us, but I've fixed some obvious typos, standardized some names (and left other possibilities up for discussion) and we seem to have reduced the number of publishers from 9,820 to 9,467 - it's pretty slow though, so I (we?) might want some mass updates done. And of course there's lots of feature requests in there too, but feel free to ignore those unless you're thinking along the same lines anyway. [[User:BLongley|BLongley]] 15:22, 27 Mar 2008 (CDT)
+
:::::::: All of my own Python code for the past 5+ (?) years has been Python 3.  However, there's very little that I use that isn't available in 2.7.  From the discourse I see on Twitter, the main things of note that have been added in recent years are type hints, async and pattern matching (basically like a more powerful switch statement AIUI).  None of these things are particularly interesting to me - I'm sure they have their uses, but I don't see any major wins for the stuff I personally do.
 +
:::::::: AFAIK (and I don't pay much attention to this) all distros still ship with both Python 2 and 3, none has moved to just Python 3.  (And generally people use virtualenvs, Docker etc for their own preferred version/libs/etc.)  In the context of ISFDB moving to Python 3, I think any benefits would be (a) not getting caught out if there are security issues discovered in Python 2; (b) longer term, new Python devs are likely to start on Python 3, so might struggle with Python 2 codebases; (c) picking up any new tooling/enhancements/whatever that almost certainly won't be available for Python 2. None of these strike me as convincing arguments to justify the work necessary for a 2->3 migration, at least at this moment in time.
 +
:::::::: IMHO there are plenty of other areas that might deserve attention over a 2->3 migration, but that's a different discussion... (Which is why I'd kept out of this talk item prior to this time) [[User:ErsatzCulture|ErsatzCulture]] ([[User talk:ErsatzCulture|talk]]) 18:29, 12 September 2022 (EDT)
  
== Wiki Links ==
+
:::::::: My concerns with staying on Python2.7 are: 1) There are issues with the Python2 unicode model, and those issues were a driving factor in the creation of Python3 (see: https://python-notes.curiousefficiency.org/en/latest/python3/questions_and_answers.html). If we undertake a large charset project, we will encounter those issues. 2) The unicode support in MySQLdb is sketchy, and the newer connectors don't work with Python2. 3) Staying with Python2 leaves us marooned on MySQLdb, which was abandoned a decade ago. If we stay on Python2, then we'll either have to take ownership of MySQLdb to fix the unicode issues we encounter, or we'll need to fork mysql.connector to support Python2 (which may not be possible).
I just tried to access the Wiki Biography & Bibliographic Comments pages from [http://www.isfdb.org/cgi-bin/ea.cgi?Philip%20Jos%E9%20Farmer Philip José Farmer]s Author page to add [http://www.xs4all.nl/~rnuninga/PJFnc.htm this] apparently useful site and we seem to have "incorrectly linked inter-language" problems. Is there a workaround for now, or will it be fixed on the next site, or should I just try to recall where bug reports go now? I'm not sure what the problem is as we cope with the "é" on the author page itself. (If that's the problem - bloody unicode again?) [[User:BLongley|BLongley]] 15:17, 3 Apr 2008 (CDT)
 
  
:Bloody unicode. Might have an impedance mismatch between MediaWiki, python, or MySQL. I'll poke around. [[User:Alvonruff|Alvonruff]] 18:28, 3 Apr 2008 (CDT)
+
:::::::: That said, I don't think we yet have a concrete (and reasonable) proposal for how to proceed. It can't be: we rewrite everything, including all data in the database - as we'll be debugging that for years, as we don't have a formalized, automated test system. I suspect the MySQL conversion and the MySQLdb/Python3 work can be done separately, but it's currently unknown how well one would work without the other, or how that work would be verified. --[[User:Alvonruff|Alvonruff]] ([[User talk:Alvonruff|talk]]) 07:52, 13 September 2022 (EDT)
  
::Firefox (at least my 2.0.0.13 version) has setting to switch between passing URLs as encoded on page (which is default) and UTF-8 (which seems to be expected by Wiki). Open new window; type in 'about:config' as URL; type in ''utf8'' in ''Filter''; double-click on '''netword.standard-url.encode-utf8''' to change value to '''true'''. You don't have to restart Firefox. Now you should be able to click on '# Bibliographic Comments: Author:Philip José Farmer' and see ''Internal consistency pass done. Ahasuerus 21:36, 19 Jun 2006 (CDT)''. Obviously you have to double-click on '''netword.standard-url.encode-utf8''' again to make links to Philip José Farmer work in ISFDB. Wiki page should still work, once you got there.
+
::::::::: What do other Python 2.7-based projects do when they need to store Unicode data in a database? Do they use MySQLdb in spite of its "sketchy Unicode support"? [[User:Ahasuerus|Ahasuerus]] ([[User talk:Ahasuerus|talk]]) 10:40, 13 September 2022 (EDT)
  
::Wikipedia somehow converts URLs on the fly; they send new location:
+
::::::::: P.S. I see that there are ways to write Python code that should work under both Python 2.7 and Python 3.4+ -- see [https://python-future.org/compatible_idioms.html this page]. Some parts require importing from "future" and related "futurization" modules, but it looks doable. If true, it should be possible to update our code to be Python 3-compatible while we are still on Python 2.7. It wouldn't immediately address some parts of the Python 2 libraries that have been deprecated in later versions of Python 3, e.g. [https://docs.python.org/3/library/cgi.html cgi], but it's a start. [[User:Ahasuerus|Ahasuerus]] ([[User talk:Ahasuerus|talk]]) 08:07, 14 September 2022 (EDT)
<pre>
 
$ wget -d 'http://en.wikipedia.org/wiki/Philip_Jos%E9_Farmer'
 
[...]
 
---request begin---
 
GET /wiki/Philip_Jos%E9_Farmer HTTP/1.0
 
User-Agent: Wget/1.10.2 (Red Hat modified)
 
Accept: */*
 
Host: en.wikipedia.org
 
Connection: Keep-Alive
 
  
---request end---
+
:::::::::: This is a pretty attractive approach, which would create the following substeps to Python3: 
HTTP request sent, awaiting response...
+
:::::::::: * Use 2to3 (https://docs.python.org/3/library/2to3.html) to do a quick side conversion of files from python2 to python3. We would not directly use these files, but would instead use them to diff the delta between python2.7 and python3 to create a roadmap of changes we would need to implement via futurization.
---response begin---
+
:::::::::: * Do a futurization of the files, ultimately minimizing the list of outliers to those that cannot be addressed with this methodology. This can be done file by file to minimize overall risk.  
HTTP/1.0 301 Moved Permanently
+
:::::::::: * Do a full conversion to python3 and move to mysql.connector, but do not modify the database. It's a TBD to determine if this step is feasible, but tests show we can use python3 and mysql.connector and extract the same strings from the database that we currently see in python2.7. It's a question of whether they can be formatted for output by python3 to a browser correctly (which I don't know the answer as yet).
Date: Sat, 05 Apr 2008 20:16:29 GMT
+
:::::::::: * Technically, the python3 conversion would be done at that point, leaving unicode as a different next big project. --[[User:Alvonruff|Alvonruff]] ([[User talk:Alvonruff|talk]]) 08:33, 14 September 2022 (EDT)
Server: Apache
 
X-Powered-By: PHP/5.2.1
 
Cache-Control: private, s-maxage=0, max-age=0, must-revalidate
 
Vary: Accept-Encoding,Cookie
 
X-Vary-Options: Accept-Encoding;list-contains=gzip,Cookie;string-contains=enwikiToken;string-contains=enwikiLoggedOut;string-contains=enwiki_session
 
Last-Modified: Sat, 05 Apr 2008 20:16:29 GMT
 
Location: http://en.wikipedia.org/wiki/Philip_Jos%C3%A9_Farmer
 
Content-Length: 0
 
Content-Type: text/html; charset=utf-8
 
X-Cache: MISS from sq28.wikimedia.org
 
X-Cache-Lookup: MISS from sq28.wikimedia.org:3128
 
X-Cache: MISS from knsq23.knams.wikimedia.org
 
X-Cache-Lookup: MISS from knsq23.knams.wikimedia.org:3128
 
X-Cache: MISS from knsq29.knams.wikimedia.org
 
X-Cache-Lookup: MISS from knsq29.knams.wikimedia.org:80
 
Via: 1.0 sq28.wikimedia.org:3128 (squid/2.6.STABLE18), 1.0 knsq23.knams.wikimedia.org:3128 (squid/2.6.STABLE18), 1.0 knsq29.knams.wikimedia.org:80 (squid/2.6.STABLE18)
 
Connection: keep-alive
 
  
---response end---
+
(unindent) I just did a quick run of both '''2to3''' (which does an automated attempt at porting python2.7 to python 3) and '''futurize''' on all files in our common directory (22 files). '''futurize''' was probably built on top of '''2to3''', as they take exactly the same arguments. Diffing the output of the two files generates a pretty small diff, mostly around the handling of iterators, which requires the futurized version to import ''object'' from builtins, which is then fed into every class method. Observations:
301 Moved Permanently
+
* The output from '''2to3''' fails to execute under python3 due to "inconsistent use of tabs and spaces in indentation", so we'll need to post-process the files to meet the isfdb indentation standard (using something like PyCharm). The output from '''futurize''' seems to run fine under Python2.7. So an additional step for moving to Python3 is to fix the indentation issues.
Registered socket 3 for persistent reuse.
+
* new imports from '''futurize''' that would need to be removed to run under python3 were:
Location: http://en.wikipedia.org/wiki/Philip_Jos%C3%A9_Farmer [following]
+
** from builtins import chr
[...]
+
** from builtins import map
</pre>
+
** from builtins import object
--[[User:Roglo|Roglo]] 15:25, 5 Apr 2008 (CDT)
+
** from builtins import range
 +
** from builtins import str
 +
** from __future__ import print_function
 +
** from future import standard_library
 +
* We would need to remove all '''object''' references before a final move to Python3.
 +
This seems pretty promising. We still have a need to run the current code base on isfdb2.org for now, so I'll explore the possibilities of having both futurized and non-futurized versions running at the same time (with different paths).
  
::Hm, however author's summary doesn't show that the page exists. --[[User:Roglo|Roglo]] 15:29, 5 Apr 2008 (CDT)
+
: I futurized everything in biblio and common, and have it online at: https://www.isfdb2.org/cgi-bin/p3/index.cgi. Observations:
 +
:* Futurize adds the __future__ imports above the pound bang line (#!_PYTHONLOC), which causes a runtime error. So some hand editing is required.
 +
:* In general, the apps run, so long as there are no specific unicode encoding problem areas present (Hungarian, British Pound pricing, TradeMark symbol, etc). Examples:
 +
:** https://www.isfdb2.org/cgi-bin/p3/ea.cgi?26
 +
:** https://www.isfdb2.org/cgi-bin/p3/title.cgi?3064640
 +
:** https://www.isfdb2.org/cgi-bin/p3/pl.cgi?910291
 +
:** https://www.isfdb2.org/cgi-bin/p3/pe.cgi?29353
 +
:** https://www.isfdb2.org/cgi-bin/p3/pe.cgi?15451
 +
: {{unsigned|Alvonruff}}
  
== Publisher field? ==
+
:: I agree that it's an attractive approach. Some of the changes outlined above, e.g. spaces vs. tabs, are just cleanup which will be beneficial even if we don't move to Python 3 in the foreseeable future.
  
Is the Publisher field supposed to be "deletable from the pub record" after the last round of changes? I am trying to get rid of "Arab Record" in [http://www.isfdb.org/cgi-bin/pl.cgi?259479 this Arabic translation of Andre Norton's ''Shadow Hawk''], but it won't go away. [[User:Ahasuerus|Ahasuerus]] 00:08, 9 Apr 2008 (CDT)
+
:: It's also good that we identified the issue with non-Latin-1 characters early in the process. If it turns out to be a show-stoppers, we'll know about it sooner rather than later. [[User:Ahasuerus|Ahasuerus]] ([[User talk:Ahasuerus|talk]]) 20:21, 14 September 2022 (EDT)
  
== .htaccess to rewrite isfdb.org ==
+
::::I agree. In everything I have read [https://github.com/PythonCharmers/python-future python-future] is a bit dated but perhaps the best and most up-to-date method to create a Python2 and Python3 compatible code base and its ''futurize'' is a good method for doing a brute force conversion (which should always have manual oversight as it is not perfect) from Python2 to Python3. Since we are discussing major Python code changes, I wanted to bring up the code structure too. Currently we host this cold with a large number of assorted CGI scripts. I am not suggesting we totally abandon CGI hosting but currently this is particularly messy and forces people to continue hosting it such. I have proposed in the past moving all the code to [[wikipedia:Web Server Gateway Interface|WSGI]] and hosting under a single CGI interface allowing it to also be hosted in other ways (e.g., [[wikipedia:FastCGI|FastCGI]], etc.). A single entry point means having to part CGI PATH_INFO to obtain path information past the script component but this is very commons in most server-side web apps today. Perhaps the bigger issue in moving to such is the permanence of inbound URLs, where we might want to setup some redirection or the like (but many do not need to be sustained like <code>/edit/</code> and <code>/mod/</code>, etc.). On the up side this would also mean the installation would be simpler as the code could be installed completely as Python libraries with only the single CGI endpoint (and any redirecting compatible endpoints) needing to be installed in CGI space (so in most situations we could be rid of <code>#!_PYTHONLOC</code>). —[[User:Uzume|Uzume]] ([[User talk:Uzume|talk]]) 17:15, 17 September 2022 (EDT)
  
Hi Al - can you put the .htaccess rewrite back in for www.isfdb.org?  TIA. <span style="border: 1px solid #f0f; border-bottom: none; padding: 0 2px">[[User:Marc Kupper|Marc&nbsp;Kupper]]&nbsp;([[User talk:Marc Kupper|talk]])</span> 07:54, 14 April 2008 (UTC)
+
::::: One thing to note is that most CGI-specific processing -- paths, script names, query values, validation, unescaping, etc -- has been moved to one central location over the last year. One temperamental part of CGI that hasn't been centralized yet is cgi.FieldStorage. And then there is the fact that the cgi module was [https://docs.python.org/3/library/cgi.html deprecated in Python 3.11]. [[User:Ahasuerus|Ahasuerus]] ([[User talk:Ahasuerus|talk]]) 17:56, 17 September 2022 (EDT)
  
:.htaccess isn't working as expected, which is why this is taking a while... [[User:Alvonruff|Alvonruff]] 15:35, 15 April 2008 (UTC)
+
== CC license: 2.0 vs. 4.0 ==
  
== yet another minor display bug ==
+
Earlier today [[User:Nihonjoe]] mentioned that Creative Commons 4.0 is the latest -- and almost identical -- version of CC 2.0, which we currently use. I know little about licenses, but it seems to be a correct assessment. Would you happen to be aware of any reasons why we shouldn't upgrade to 4.0? [[User:Ahasuerus|Ahasuerus]] 20:17, 18 April 2022 (EDT)
  
I mention this hoping it's a quick & easy fix:
+
: I have no issue with Attribution 4.0 International (CC BY 4.0). [[User:Alvonruff|Alvonruff]] 06:37, 19 April 2022 (EDT)
  
In pub, or at least magazine, listings, it seems that if the author's name is a pseudonym, the display of any series gets lost.  For example, consider [http://www.isfdb.org/cgi-bin/pl.cgi?ANLGAUG63 this pub], specifically the editorial, "A Place for the Subconscious".  It's by John W. Campbell, Jr., as by John W. Campbell.  The series [Editorial (Analog)] isn't displayed.  This is probably because it's the parent (JWCJr) that actually has the series in the title record.  But if you click on the editorial link, the child (no Jr) record shows the series as though it were in that title, & of course the parent is being read to get the "as by".  Don't know how easy it would be to fix, though.  Thanks [[User:Davecat|Dave (davecat)]] 14:18, 15 April 2008 (UTC)
+
:: Thanks! [[User:Ahasuerus|Ahasuerus]] 10:42, 19 April 2022 (EDT)
  
== Python error during make varient  ==
+
== Searching ==
  
<code><pre>
+
I don't know whose lap this would fall into (I will point Ahasuerus to this), but with regard to this [[ISFDB:Moderator_noticeboard#Wiki_search|Wiki search behavior]], I think that may mean that maintenance/rebuildtextindex.php ought to be (re)runIIRC, the normal background search index rebuilding only works off of the recent changes list. The move might have had some other oddball effect on the existing index that is causing it to not align correctly somehow. --[[User:MartyD|MartyD]] ([[User talk:MartyD|talk]]) 14:39, 14 September 2022 (EDT)
/var/www/cgi-bin/edit/submitmkvar1.cgi in ()  
 
  48                sys.exit(0)
 
   
 
  49
 
   
 
  50        if int(title_id) == int(parent_id):
 
 
  51                print '<div id="WarningBox">'
 
 
  52                print "<h3>Error: Title record can not be a variant to itself.</h3>"
 
 
builtin int = <type 'int'>, title_id = '107917', parent_id = '?575173'
 
  
<type 'exceptions.ValueError'>: invalid literal for int() with base 10: '?575173'
+
: I'll leave it in Al's capable hands :-) [[User:Ahasuerus|Ahasuerus]] ([[User talk:Ahasuerus|talk]]) 15:07, 14 September 2022 (EDT)
</pre></code>
 
  
The above happens if a user is trying to make a title a varient of an existing record, and copies one character too many from the address bar of the browser window where the target record is displayed, thus prefixing the record number with a question mark (?). Apparently no harm is done, you can jsut hit back and enter the correct number, but the error message is confusing at best. -[[User:DESiegel60|DES]] <sup>[[User talk:DESiegel60|Talk]]</sup> 01:32, 4 May 2008 (UTC)
+
:: Well before I embark on an update that "may take several hours" (according to the docs), I guess I'd like to know exactly what issue we're trying to solve, and how we know it the update had any effect. I'm not seeing any search issues, and I'm not using quotes. For example, if I search for the words ''normal background search'' (without quotes) from MartyD's post above, I see this page in the results. So is there a test search that fails, that we know should not fail? --[[User:Alvonruff|Alvonruff]] ([[User talk:Alvonruff|talk]]) 16:21, 14 September 2022 (EDT)
  
== Leading/trailing spaces in tags? ==
+
:: So just to be clear on what I'm seeing, let's take the ''Lord of the Rings'' example cited above:
 +
::* If I type the words ''Lord of the Rings'' into the search bar, without quotes, I see a single hit for the page "Rules and standards discussion", which does not actually contain the phrase "Lord of the Rings".
 +
::* If I then click on "Everything" (just below the search bar), I then see 5 hits, the two most important being "User talk:Animebill" and "User talk:Mavmaramis", both of which do contain the phrase "Lord of the Rings".
 +
::* If I click on "Advanced" it reveals why this is the case. The default search namespace is "(Main)" and none of the other namespaces are checked, so searches will not look on the "User talk" namespace pages, which is why the phrase on both the "User talk:Animebill" and "User talk:Mavmaramis" pages fail to show up as hits.
 +
::* If I select the "User talk" namespace, and then click on "Remember selection for future searches", and then search again, I see 4 hits. It doesn't display all 5 hits, because the fifth hit is "ISFDB:Moderator noticeboard", where the issue was reported, and that page is in the "ISFDB" namespace - which I did not enable.
 +
::* If I go to "Advanced" and click the "All" button on the right (under "Check") as well as the box for "Remember selection for future searches", then a search shows all five hits. --[[User:Alvonruff|Alvonruff]] ([[User talk:Alvonruff|talk]]) 17:34, 14 September 2022 (EDT)
  
I approved and massaged a non-genre Dissembler submission a few minutes ago and then noticed that we seem to have two identical tags ("strong female characters") on [http://www.isfdb.org/cgi-bin/ea.cgi?Jennifer%20Roberson Jennifer Roberson's page]. A closer look at the data revealed that tag 3131 has a leading space. Do we want to strip leading and trailing spaces at file time? [[User:Ahasuerus|Ahasuerus]] 03:35, 8 May 2008 (UTC)
+
:::* P.S. It now shows 6 hits, since I said the words on this page :) --[[User:Alvonruff|Alvonruff]] ([[User talk:Alvonruff|talk]]) 17:38, 14 September 2022 (EDT)
  
:Probably. Sorry about the dissembler leftover - I'm methodically going through Locus Books Received, but needed some example XML for the Web API article, and didn't go back to clean up that submissions. [[User:Alvonruff|Alvonruff]] 11:26, 8 May 2008 (UTC)
+
:::: If I type "lord of the rings" with no quotes into the top search box, I get 6 hits, none showing "lord of the rings". The search results page shows context for me is Advanced, with Main + User + User talk + ISFDB + ISFDB talk + File + Help + Help talk + Magazine.  Re-pushing the Search button there produces the same results. If I type "lord of the ring" with quotes, in either location, and all other things the same, it produces 5 hits, all of which show that phrase.  I do notice the five pages found are a subset of the 6 pages found in the original hit, so perhaps what's displayed is just an artifact of how the snippet is selected; I did not notice that before.  BUT....  Taking the original complaint that there should be many hits at face value, I also notice that all of the hits are on recently modified pages, and none is on a page not recently modified.  Which makes me think (Male Answer Syndrome, I admit) that the background index rebuild is working on the recently changed pages, and so searching is finding those, but older pages need to be re-indexed. --[[User:MartyD|MartyD]] ([[User talk:MartyD|talk]]) 12:46, 16 September 2022 (EDT)
 +
::::: I think that Marty is right - the problem is not new pages - these get indexed just fine. The problem are old pages after the DB change. One page I always look for via search is [https://isfdb.org/wiki/index.php/Help:Entering_non-genre_periodicals Entering non-genre periodicals]. The current search cannot find it in any way or form (it does find a few pages where it was referenced and which had been updated lately but not the main page). I just went via google search to pull it up but I suspect that the lack of an index may have made all our help pages not findable and this is not optimal... [[User:Anniemod|Annie]] ([[User talk:Anniemod|talk]]) 13:44, 16 September 2022 (EDT)
  
::No worries, it has now found a loving home in the Non-genre section of Jennifer Roberson's bibliography :-) [[User:Ahasuerus|Ahasuerus]] 14:38, 8 May 2008 (UTC)
+
:::::: Ok. maintenance/rebuildtextindex.php has completed. Let's see if it rectifies the situation. --[[User:Alvonruff|Alvonruff]] ([[User talk:Alvonruff|talk]]) 14:51, 16 September 2022 (EDT)
 +
::::::: Search for "Entering non-genre periodicals" (with or without quotes) shows the Help page (and its Talk page) now, including populating the "Page title matches" area which was empty before so we seem to be back to normal. A few random other help pages also pop up as soon as you look for them (which was not happening earlier). "lord of the rings" with no quotes pulls 174 results now. Marty will probably want to recheck but I think we are all sorted now. Thanks! [[User:Anniemod|Annie]] ([[User talk:Anniemod|talk]]) 15:00, 16 September 2022 (EDT)
  
== Shortfiction-only series ==
+
:::::::: That did it!  Now "lord of the rings" finds 164 hits without quotes and 147 hits with quotes, many pages last edited years ago.  Thanks! --[[User:MartyD|MartyD]] ([[User talk:MartyD|talk]]) 17:06, 16 September 2022 (EDT)
  
I noticed two commented-out lines in ea.cgi (aka [http://isfdb.cvs.sourceforge.net/isfdb/isfdb2/biblio/ea.py?view=markup biblio/ea.py])
+
== Adding Mediawiki extension TemplateStyles ==
  
  #bib.loadShortSeriesData()
+
Will you install the [https://www.mediawiki.org/wiki/Extension:TemplateStyles TemplateStyles extension]? It will allow for individual templates to have specified mini stylesheets. Thanks! ···[[User:Nihonjoe|<font color="darkgreen">日本穣</font>]] · <small>[[Special:Contributions/Nihonjoe|<font color="blue">投稿</font>]] · [[User talk:Nihonjoe|Talk to Nihonjoe]]</small> 15:24, 27 December 2022 (EST)
  #bib.printShortSeries()  
 
  
One way to fix the out-of-chronology display on ''Summary bibliography'' would be to use again these functions to get 'short fiction only series' section at the beginning of short fiction listing (and fix them so that they won't display an empty series where there is a book-size work in the series). These would cause the series to 'jump' up the page when a collection or a novel are published.
+
:Including the TemplateStyles extension causes a fatal wiki error across all pages. I'll need to debug on the other server. [[User:Alvonruff|Alvonruff]] ([[User talk:Alvonruff|talk]]) 08:48, 28 December 2022 (EST)
  
Another way would be to add <code> or titles.title_ttype='SHORTFICTION'</code> to the <code>SQLgetNCSeriesData(authorec)</code>. These would add short fiction only series to the '''Fiction Series'''. Is there a reason not to do it? (I'm still trying to work out the way series are displayed, so there may be side effects I don't see yet.) --[[User:Roglo|Roglo]] 11:05, 10 May 2008 (UTC)
+
::What's the specific error? I've had good luck using the [https://www.mediawiki.org/wiki/Project:Support_desk Support desk] over on the Mediawiki site. ···[[User:Nihonjoe|<font color="darkgreen">日本穣</font>]] · <small>[[Special:Contributions/Nihonjoe|<font color="blue">投稿</font>]] · [[User talk:Nihonjoe|Talk to Nihonjoe]]</small> 12:20, 28 December 2022 (EST)
  
I added [[User:Roglo/Programming_Docs|some notes]] about the fiction series display on Summary bibliography. --[[User:Roglo|Roglo]] 14:32, 10 May 2008 (UTC)
+
== Saturn's Children ==
  
== Python error on advanced search ==
+
https://www.isfdb.org/cgi-bin/pl.cgi?279672; https://archive.org/details/isbn_9780739499344; Archive.org copy uploaded way back in 2012, info fits your PV but the wrong cover (with the right artist) is shown on the ISFDB page, somebody named Aardvark or something like that entered the same edition recently but left out/botched some stuff and didn't PV, so if you want to add the Archive link to yours, replace the cover, and then maybe ask Mr. Aardvark if they think theirs is still needed or could be deleted. --[[User:Username|Username]] ([[User talk:Username|talk]]) 09:57, 30 December 2022 (EST)
  
The following occured whil trying to search for titles containing "whispers" but not "cover" -[[User:DESiegel60|DES]] <sup>[[User talk:DESiegel60|Talk]]</sup> 20:25, 10 May 2008 (UTC)
+
:This is a book I had at the time, but was sent away during one of the many book purges, so I can't go to the source any longer. That said, the image is correct, and is consistent with the other Ace editions, which list the artist as Joe Williamsen. So I suspect it requires an artist change, not an image change. [[User:Alvonruff|Alvonruff]] ([[User talk:Alvonruff|talk]]) 20:52, 30 December 2022 (EST)
  
<code>
+
== Taff ==
QUERY: select titles.* from titles where titles.title_title like '%Whispers%' ANDNOT titles.title_title like '%cover%' order by titles.title_title limit 100
 
--> -->
 
 
 
<class '_mysql_exceptions.ProgrammingError'> Python 2.5: /usr/bin/python
 
Sat May 10 15:22:14 2008
 
  
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
+
https://www.isfdb.org/cgi-bin/ea.cgi?15027; Re: your recent entry of contents for Orphans of Bliss, either Taff's name has the periods or it doesn't, in which case a variant would need creating. --[[User:Username|Username]] ([[User talk:Username|talk]]) 19:08, 2 March 2023 (EST)
  
/var/www/cgi-bin/edit/tp_search.cgi in ()
+
== Python3 and Unicode thoughts ==
  174        db = dbConnect()
 
 
  175        db.select_db(DBASE)
 
 
  176        db.query(query)
 
 
  177        result = db.store_result()
 
 
  178        num = result.num_rows()
 
 
db = <_mysql.connection open to 'localhost' at 814d0cc>, db.query = <built-in method query of Connection object at 0x814d0cc>, query = "select titles.* from titles where titles.title_t...e '%cover%' order by titles.title_title limit 100"
 
  
<class '_mysql_exceptions.ProgrammingError'>: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ANDNOT titles.title_title like '%cover%' order by titles.title_title limit 100' at line 1")
+
A couple of thoughts about [[User:Alvonruff#Python3_Notes]], specifically "2. Update all character sets":
</code>
 
{{unsigned|DESiegel60}}
 
  
:There are so many known issues with Advanced Search that I believe Al is planning a complete overhaul in the foreseeable future. [[User:Ahasuerus|Ahasuerus]] 23:15, 10 May 2008 (UTC)
+
* A number of Python modules currently reference "iso-8859-1" explicitly. In some cases it's apparently redundant and can be removed at any time, but a few modules like [https://sourceforge.net/p/isfdb/code-svn/HEAD/tree/trunk/common/isfdb.py common/isfdb.py] will need a manual review.
::I see. Thanks. -[[User:DESiegel60|DES]] <sup>[[User talk:DESiegel60|Talk]]</sup> 00:07, 11 May 2008 (UTC)
+
* The software uses a number of HTML-encoded Unicode strings for certain UI elements and currency signs. They were recently consolidated in "class _Ui" and "class _Currency" in [https://sourceforge.net/p/isfdb/code-svn/HEAD/tree/trunk/common/isfdb.py common/isfdb.py]. There are a few other functions and classes that also use HTML-encoded Unicode string, e.g. "def ISFDBUnicodeTranslation" in common/library.py and a bunch of functions in the cleanup reports directory. Some can be consolidated ahead of time.
  
== Image Uploading ==
+
Also, my next big project is migrating Fixer to Python/MySQL and re-hosting it on a server accessible to moderators (which may or may not be the live ISFDB server depending on the likely impact on performance.) I have already migrated the Amazon API and some other supporting modules, but most of the heavy lifting still needs to be done. I should presumably go back and make sure that the previously migrated modules work under Python 3. None of them use MySQL, so they can't be a test case for the MySQL conversion. [[User:Ahasuerus|Ahasuerus]] ([[User talk:Ahasuerus|talk]]) 12:35, 27 April 2023 (EDT)
  
Al, I've tested the waters by uploading the cover of the most recent Asimov's, trying to keep the same file naming scheme that you've started, and the same dimensions as well. It's looks pretty good, so I think I did it correctly. Let me know if there's a problem. Thanks. [[User:Mhhutchins|MHHutchins]] 02:10, 14 May 2008 (UTC)
+
: I haven't thought strongly about the character set problem as yet. I just happened to notice a number of display errors when I had index.cgi, ea.cgi, and pl.cgi all running under python3.
 +
: I think we can discuss hosting fixer on isfdb2, especially since all the login/moderator data is already there. It's just not stable right now, with python3 experiments, but there's no reason it couldn't have its own set of unaffected web pages.
 +
: I'm currently converting existing files for print(), MySQL, and tabs, and ensuring that they still run on python2. If you want access to the new SQLparsing.py let me know, and I'll drop a copy someplace on isfdb2. It runs fine under python3 (after installing mysql.connector, and making a 1-line change to the file) [[User:Alvonruff|Alvonruff]] ([[User talk:Alvonruff|talk]]) 15:21, 27 April 2023 (EDT)
  
:Looks good. [[User:Alvonruff|Alvonruff]] 02:15, 14 May 2008 (UTC)
+
:: Chances are that I won't be able to start working on migrating Fixer's data to MySQL until some time in June at the earliest, so there is no rush. I need to fix {{Bug|491}} first and then I need to merge Fixer's "978 ISBNs" data store with the "B0 ASINs" data store. Designing a new workflow for Fixer won't start until after I am done with that.
  
:: I got the first problem then? "'''Error creating thumbnail: /var/www/html/wiki//bin/ulimit4.sh: line 4: /usr/local/bin/convert: No such file or directory'''". It's the tallest image I've tried so far so that might be the cause (1912 image at latest, apparently, so hopefully well out of copyright and therefore not subject to 500 pixel rules?). Image:Frontispiece.jpg [[User:BLongley|BLongley]] 20:13, 14 May 2008 (UTC)
+
:: As an aside, making Fixer's data available to moderators will change a lot of things since it will mean going from a single user (me) to multiple concurrent users. For starters, the Amazon API can only handle so many multi-ASIN requests per minute, so we will need a single-threaded background process with a built-in throttle mechanism.
:: Uploads going well so far otherwise, although looking at the samples so far [http://www.isfdb.org/wiki/index.php?title=Special%3APrefixindex&from=&namespace=6 (not sure how to Wiki-Link to it, but this works for now)] makes me realise we will need naming standards fast, and I've already got two categories DES hasn't covered. Off to try the templates. [[User:BLongley|BLongley]] 20:13, 14 May 2008 (UTC)
 
:::I thought that the 500 pixel standard was at least in part to reduce server & backup load. As to tempaltes, what additional cases are needed? I see logos and signature blowups in your uplaods. -[[User:DESiegel60|DES]] <sup>[[User talk:DESiegel60|Talk]]</sup> 14:50, 15 May 2008 (UTC)
 
:::: The only 500 pixel limit I recall is Marc Kupper mentioning that's what Amazon resize to: but I'll take guidance on server and backup stresses. The new daily backups (just tested, seem fine so far) look like we're avoiding backup stress with partial backups though? [[User:BLongley|BLongley]] 19:02, 15 May 2008 (UTC)
 
:::: As to templates - well, I was hoping for ones that would allow positioning or resizing of images on Wiki pages, or automatically including title/artist/date/etc. : i.e. for USE of the image rather than ABOUT the image. But I'm not sure what CAN be done with templates so I'm open to suggestions. [[User:BLongley|BLongley]] 19:02, 15 May 2008 (UTC)
 
:::::Images can be displayed on wiki pages, and can be positioned and sized there. Existing wiki syntax will do most of that, but I can easily create templates to standardize and simplify doing that. I wasn't aware that there were plans to display significant numbers of images on wiki pages. In what circumstances do you plan such displays? i can probably create better templates with more info about their purpose or purposes. -[[User:DESiegel60|DES]] <sup>[[User talk:DESiegel60|Talk]]</sup> 19:54, 15 May 2008 (UTC)
 
  
:::::: The plans for the use of the Wiki are always a little vague as we're never quite clear how much Al is intending to put into the database side instead. I know with the latest publisher changes that some of my activity on the Wiki side is now redundant and/or needs to be moved: I don't need to add Wikipedia links on the Wiki Publisher pages now they're recorded in the database. And some of my shorter Wiki Publisher entries could have been done in the new Publisher Notes. I see no signs of publisher/imprint hierarchies in the database yet though, so those I won't move yet, and am trying to improve links for those in the Wiki. (As you may have noticed from my previous "How do I do X?" questions.) On the topic of images (which I will try to stay on), I've always been quite glad of the ability to add coverart images to pubs, and been a bit annoyed at the use of unstable URLs. What I would like to add here on ISFDB are all the things I've had to do with workarounds: like hosting my own images to ask "does the signature look like ''this''?" ([http://www.isfdb.org/wiki/index.php/User_talk:BLongley#Ted_White.27s_Sorceress_of_Qar here]) or ask should "THIS cover be considered the same as THAT cover?" like [http://www.isfdb.org/wiki/index.php/Rules_and_standards_discussions#Cover_art_that_gets_reworked here]. Those are examples of where I would like to upload sample signatures, and where I would like to have better control of how to USE artwork so it doesn't blast out at people. The other immediate thought (from working on Publishers recently) is that a change in a publisher's logo often dates a particular publication even if someone hasn't entered details from the copyright page, or if the copyright page is missing, or even if the book predates such niceties. "A picture is worth a thousand words" isn't always true - think of toilet signs where one picture effectively says "Men" and the other says "Women" and that's all - and I own original art where the picture CAUSES a thousand words of questions and explains nothing - but I think we can usefully use images more than we currently do. [[User:BLongley|BLongley]] 22:34, 15 May 2008 (UTC)
+
:: Also, the current Fixer design is based on the idea that an ISBN/ASIN can be assigned to one (and only one) "queue". Fixer's other tables and algorithms -- high/low priority publishers, high/low priority authors, etc -- support this design. When multiple moderators start working on Fixer's data, they will concentrate on different areas as we have seen happen in the past. Using multiple servers (since creating lists of new ISBNs/ASINs will be done on a third server) will add more wrinkles. Etc.
  
:::::As to automatically picking up info, I'm not aware of any way for the wiki page to pick up and use info from an ISFDB data record, but there may be one.-[[User:DESiegel60|DES]] <sup>[[User talk:DESiegel60|Talk]]</sup> 19:54, 15 May 2008 (UTC)
+
:: Not all of this functionality needs to be implemented right off the bat, but we will want to make sure that the new design doesn't paint us into a corner. [[User:Ahasuerus|Ahasuerus]] ([[User talk:Ahasuerus|talk]]) 16:34, 27 April 2023 (EDT)
  
:::::: Al is working on Web APIs to provide ISFDB data, I'm not sure if Wikimedia could use them. There's a lot of Web 2.0 buzz about Web Service providers and consumers but I've no idea if they're going to work together anytime soon, and I personally wouldn't worry about it unless we can see a major bonus. [[User:BLongley|BLongley]] 22:50, 15 May 2008 (UTC)
+
== mysql.connector ==
  
:::::However, if we are to host and display book cover images, most of which are under copyright and which we can therefor only use under "Fair use" I think we need something like the templates I designed. Perhaps the amount of info recorded can be cut down, but i think at least some of it ought to be there. That is, ultimately, a policy decision -- I modeled my templates on the ones currently used for book covers on Wikipedia -- in fact I blatantly copied colors and wording to a significant degree -- but if we jointly decide (or if Al decrees) otherwise, I'll be happy to reword the templates to whatever standard we think is best.
+
A couple of questions/thoughts re: [[User:Alvonruff/mysql.connector]]:
  
:::::: My (possibly over-simplistic) suggestion would be to restrict ourselves to having limits that are ALL Fair-Use and have ONE justification for each type of use. I know that I'm not going to add 2,500 coverart images HERE if I have to justify them all individually. But I can support further justifications for other usages like the logos and artist sigs and any other uses people want. [[User:BLongley|BLongley]] 22:50, 15 May 2008 (UTC)
+
* mysql.connector 8.0.24 doesn't play nice with Python 2.7, but versions 8.0.23 and lower do, at least according to [https://dev.mysql.com/doc/connector-python/en/connector-python-versions.html MySLQ.com]. I wonder if 8.0.23 may be worth a try since it would presumably let us upgrade the ISFDB software in small increments while remaining on Python 2.7.
:::::::I fear it is slightly over simplistic. For oen thing, some iamges will be PD, and we really ought to indicate which are which. But the most important thing is that valid fair use generally requires proper attribution and credit. The point of the template was so that you '''don't''' have to justify each iamge -- the justification is bolierplate that is repeated automatically -- you only need to provide identification and attribution info, Pershps some of the info in my first draft tempaltes could be dropped to make the process easier. I'm already using more bolierplate and less individual justification than Wikipedia does, because the situations for our iamges will be less varied. -[[User:DESiegel60|DES]] <sup>[[User talk:DESiegel60|Talk]]</sup> 05:28, 16 May 2008 (UTC)
+
* The [https://dev.mysql.com/doc/connector-python/en/connector-python-api-mysqlconnection-sql-mode.html MySQLConnection.sql_mode Property] section of the "MySQL Connector/Python Developer Guide" has a list of connector properties that can be set. The list includes 'NO_ZERO_IN_DATE' and 'NO_ZERO_DATE', which is what MySQL uses to support "00" month/day values and "0000-00-00" values respectively. Have you tried experimenting with them?
 
:::::As for size limits, there was some mention in the dialog on the Community portal, i think -- not being involved with the server side of things myself, i disclaim any responsibility for saying what would or would not affect server space or backup times. On legal issues, using a version that is at a reduced resolution helps with the "effect on the market" prong of the fair use test, but there is no absolute standard that images use under fair use must be reduced to a particular size, or percentage, or indeed at all. If you can say that the reduction is enough that the image could not be printed out at the original size and quality, that is all that matters for fair use, and even that is not '''required'''. -[[User:DESiegel60|DES]] <sup>[[User talk:DESiegel60|Talk]]</sup> 19:54, 15 May 2008 (UTC)
 
  
== Misattributed submissions? ==
+
[[User:Ahasuerus|Ahasuerus]] ([[User talk:Ahasuerus|talk]]) 16:16, 30 April 2023 (EDT)
  
We seem to have at least one mis-attributed submission as discussed [http://www.isfdb.org/wiki/index.php/ISFDB:Community_Portal#Update_by_me_that_I_didn.27t_enter here]. I hope we don't get other fields mixed up or else we may end up with ''The War of the Worlds'' by Robert A. Heinlein! [[User:Ahasuerus|Ahasuerus]] 03:14, 16 May 2008 (UTC)
+
: I experimented with the Python3 datetime class (not related to MySQL at all), and it no longer supports the concept of a month=0 or day=0, and throws an exception. Suggestions on the Internet are to use year-01-01, which doesn't work for us. So I currently believe we need to extract the dates as a string (possibly into a custom datetime class). Nonetheless, it feels like something is being missed, as this is a pretty big fundamental issue. There are ways of creating a custom converter for the connector, which I'm also looking at.
  
== Verified Pubs, F&SF 2007 ==
+
: Using 8.0.23 may be interesting. It may also pull is into the charset issues (which I haven't started looking at yet). [[User:Alvonruff|Alvonruff]] ([[User talk:Alvonruff|talk]]) 06:19, 1 May 2023 (EDT)
  
Added cover images to your verfied pubs Magazine of F&SF, 2007 - 01, 02--[[User:Rkihara|Rkihara]] 17:14, 23 May 2008 (UTC)
+
::Okay, I am onto a different trail. If you initiate the connector with raw=True, you get back a bytearray for each field, so fields of type DATE are returned, since you are bypassing the converter in the connector. You then cast with str() using the target charset (I am oversimplifying, as you need to worry about NULL and integer fields). I have something hobbling, but need to unwind the other changes. [[User:Alvonruff|Alvonruff]] ([[User talk:Alvonruff|talk]]) 22:25, 1 May 2023 (EDT)
  
== Two Reviews in one magazine for same book under two pseudonyms ==
+
::: What will the "raw mode" do to time, float and enum values? Also, if I understand the idea correctly, titles like "1984", authors like {{A|171}} and series names like "1999" will be converted to int, right? [[User:Ahasuerus|Ahasuerus]] ([[User talk:Ahasuerus|talk]]) 23:08, 2 May 2023 (EDT)
  
One of your verified pubs [http://www.isfdb.org/cgi-bin/pl.cgi?ANLGJUL65 Analog July 1965] has two reviews for "The Issue at Hand" one by James Blish and one by William Atheling. [http://www.isfdb.org/cgi-bin/pl.cgi?ANLGMAY71 Analog May 1971] only has one, but it's by William Atheling''', Jr''' - where we have the pseudonym in the database but not the title under that pseudonym. Given your comment "the authors aren't of much value if the names are mangled", what would you suggest for the way forward? [[User:BLongley|BLongley]] 18:14, 25 May 2008 (UTC)
+
::: [Edit:] Another thought. As you said in your notes, ideally we would address this issue at the query level. Something like "SELECT CAST(title_copyright AS CHAR)" or "DATE_FORMAT(title_copyright, '%Y-%m-%d')" instead of "SELECT title_copyright". The most time-consuming problem with this approach is that we have a lot of "SELECT *" queries, where "*" would need to be changed to a full list of fields for this approach to work.
  
: Ouch.  It looks like I probably added the second one (at a guess, from a note I left earlier on this (Al's) page). Looking at the pub (in the ISFDB data), I see that the first review lists before the entry for "The Reference Library", which suggests that I may just have not seen it. <sigh> I'm pretty sure that I entered the one that says it's by Blish.  Since this isn't a review with a normal heading (buried in Miller's initial essay), there's a slight ambiguity; but I'd understand it to say he's reviewing a book by Blish containing (but not limited to) columns originally published as by "William Atheling, Jr.".  So my own take would be that the "Atheling" entry is just wrong here.  (But I won't nuke that unless someone asks me to; I'm just putting in my $0.02.  If the decision is to remove one of them, I can certainly remove whichever one is chosen, of course.) -- [[User:Davecat|Dave (davecat)]] 20:51, 25 May 2008 (UTC)
+
::: One possible workaround would be to create globally scoped variables or attributes (in common/isfdb.py) with lists of field names for each ISFDB table. Date field names would be defined to include "CAST" or "DATE_FORMAT". Once that's done, we should be able to modify all queries (mostly in common/SQLParsing.py) which start with "select * from table_name" to use "select %s from table_name" % LIST_OF_FIELD_NAMES_FOR_THIS_TABLE instead. [[User:Ahasuerus|Ahasuerus]] ([[User talk:Ahasuerus|talk]]) 23:36, 2 May 2023 (EDT)
::I Own a copy of ''The issue at Hand''. I think, but would have to check, that all its contetns were originally published under the name of "William Atheling, Jr.".  However, the colelction had Blish's name on it, and soem of the contents had i think been revised for book publication. Some of the essays in the later ''The Tale that Wags the God'' were, i think originally published under Blish's own name, and some under "William Atheling, Jr.". -[[User:DESiegel60|DES]] <sup>[[User talk:DESiegel60|Talk]]</sup> 20:59, 25 May 2008 (UTC)
 
  
:: Oh, there's no '''blame''' here, Davecat, just a question: this sort of review linking is only hours old and is throwing up new questions all the time. Whether we want to link to an existing title/author only, or use the reviewee and canonical title (if we have the title and author separately) is something to ponder. DES - for links to the title I don't think the '''content''' attributions matter, but if it's a "James Blish writing as William Atheling" (Jr. ?) then we'd want to get that right. Although it's perfectly possible we have all 3 author variants for the pub(s), and all 3 as reviewees too, and not necessarily linked the same way... [[User:BLongley|BLongley]] 22:22, 25 May 2008 (UTC)
+
::: [Edit #2] Another advantage of this workaround would be the ability to update all queries to use the newly defined globally scoped variables/attributes ahead of time, before migrating to the new connector. The connector migration patch would only need to change the lists of table-specific field names in common.isfdb.py to include "CAST" or "DATE_FORMAT" for date fields. [[User:Ahasuerus|Ahasuerus]] ([[User talk:Ahasuerus|talk]]) 07:39, 3 May 2023 (EDT)
:::''The Issue at Hand'', at least in {{P|264133|name=my copy}}, is credited as a book to "Atheling, jr" but said to be "edited and with an introduction" by Blish, and in the intro Blish makes it clear that he is Atheling, and says that most but not all the essays originally appeared over the Atheling signature. I have entered the essay titles, and started to enter the reviews, from my copy. (By the way this includes the essay where "Atheling" reviewd, at soem length and fairly bitingly, the magazine version of "A Case of Conscience" by Blish). -[[User:DESiegel60|DES]] <sup>[[User talk:DESiegel60|Talk]]</sup> 15:13, 26 May 2008 (UTC)
 
  
== Use of uploaded images ==
+
:::: The problem with both CAST and DATE_FORMAT is that they only work well if you are selecting just the date field. IF you issue the following SQL command:
  
Was the uploading facility turned on only for testing purposes? Or is it now ok to use images in our wiki as cover images on pubs in the live db? -[[User:DESiegel60|DES]] <sup>[[User talk:DESiegel60|Talk]]</sup> 05:36, 26 May 2008 (UTC)
+
    select *, cast(title_copyright as char) from titles where title_id=10604;
  
== Python error making submission containing bad HTML ==
+
:::: MySQL returns:
  
I failed to put in the clsoe quote on an HTMLlink tag, and got:
+
  +----------+-------- [...]
 +
    | title_id | title_title                    | title_translator | title_synopsis | note_id | series_id | title_seriesnum | title_copyright | title_storylen | title_ttype | title_wikipedia | title_views | title_parent | title_rating | title_annualviews | title_ctl | title_language | title_seriesnum_2 | title_non_genre | title_graphic | title_nvz | title_jvn | title_content | cast(title_copyright as char) |
 +
    +----------+------- [...]
 +
    |    10604 | Doctor Who and the Giant Robot | NULL            |          NULL |  151121 |      5277 |              28 | 1975-03-13      | NULL          | NOVEL      | NULL            |        1316 |            0 |        NULL |              1223 |        0 |            17 | NULL              | No              | No            | Yes      | Yes      | NULL          | 1975-03-13                    |
 +
    +----------+------- [...]
  
 +
:::: The date field is not modified in place, the string version is appended to the end of the record. DATE_FORMAT does the same. So there must be some fixup code as well, that takes the appended field at (titles[len(record)-1]) and copies it into the original field at (titles[TITLE_YEAR]), which will be a datetime from Python's perspective. This was the first strategy that I took, but examining each query to figure out where the FORMAT statement goes, as well as the placement of the fixup code was taking a considerable amount of time, and there are roughly 1400 unique query statements to go modify. So I was looking for something a little less invasive and error prone, which was raw mode.
  
<code>
+
:::: The attribute field idea is interesting, however the fetch_row/fetchmany routines don't have any idea what record type they are reading - they just extract the next blob of available data. And not all queries extract whole records. For instance:
--------------------------------------------------------------------------------
 
<?xml version="1.0" encoding="iso-8859-1" ?>
 
<IsfdbSubmission>
 
<NewPub>
 
<Submitter>DESiegel60</Submitter>
 
<Subject>Uncle Silas: A Tale of Bartram-Haugh</Subject>
 
<Parent>885686</Parent>
 
<Title>Uncle Silas: A Tale of Bartram-Haugh</Title>
 
<Year>1926-00-00</Year>
 
<Publisher>Oxford University Press</Publisher>
 
<Pages>441</Pages>
 
<Binding>hc</Binding>
 
<PubType>NOVEL</PubType>
 
<Isbn>#306 (World's classics)</Isbn>
 
<Note><a HREF="http://worldcat.org/oclc/56253138>OCLC: 56253138</a>.<br>
 
Entry based on data from OCLC/Worldcat, see link. (DES May 2008)</Note>
 
<Authors>
 
<Author>Joseph Sheridan Le Fanu</Author>
 
</Authors>
 
<Content>
 
</Content>
 
</NewPub>
 
</IsfdbSubmission>
 
--> -->
 
 
 
<class '_mysql_exceptions.ProgrammingError'> Python 2.5: /usr/bin/python
 
Tue May 27 18:05:57 2008
 
  
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
+
    query = "select metadata_counter from metadata"
  
/var/www/cgi-bin/edit/submitpub.cgi in ()
+
:::: So we would need to store a custom conversion mapping before making the query call. For instance:
  210        else:
 
 
  211                update = "insert into submissions(sub_state, sub_type, sub_data, sub_time, sub_submitter) values('N', %d, '%s', NOW(), %d)" % (MOD_PUB_UPDATE, update_string, submitter_id)
 
 
  212        db.query(update)
 
 
  213
 
 
  214        PrintPostSearch(0, 0, 0, 0, 0)
 
 
db = <_mysql.connection open to 'localhost' at 945ae1c>, db.query = <built-in method query of Connection object at 0x945ae1c>, update = "insert into submissions(sub_state, sub_type, sub...\\n </NewPub>\n</IsfdbSubmission>\n', NOW(), 13372)"
 
  
<class '_mysql_exceptions.ProgrammingError'>: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's classics)</Isbn>\n <Note>&lt;a HREF=&quot;http://worldcat.org/oclc/56253138&' at line 1")  
+
    CNX.FORMAT("INT")
</code>
+
    query = "select metadata_counter from metadata"
 +
    CNX.QUERY(query)
  
 +
:::: Or the more complicated:
  
After trying several times to re-enter with the link syntqax corrected, and getting the same error, i re-ented without the link, and still got an error, as follows:
+
    CNX.FORMAT("INT, STR, STR, INT, INT, INT, INT, CHAR, CHAR, INT, CHAR, INT, INT, FLOAT, INT, INT, INT, CHAR, INT, INT, INT, INT, CHAR")
 +
    query = "select * from titles where title_id=10604;
 +
    CNX.QUERY(query)
  
<code>
+
:::: That can certainly be done, and it would be preferable to the current brute force method, but it is encroaching on custom converter territory. At least a custom converter has direct access to the MySQL field types, so we wouldn't have to specify them. I will look into that for round #3 on the problem. [[User:Alvonruff|Alvonruff]] ([[User talk:Alvonruff|talk]]) 10:00, 3 May 2023 (EDT)
<?xml version="1.0" encoding="iso-8859-1" ?>
 
<IsfdbSubmission>
 
<NewPub>
 
<Submitter>DESiegel60</Submitter>
 
<Subject>Uncle Silas: A Tale of Bartram-Haugh</Subject>
 
<Parent>885686</Parent>
 
<Title>Uncle Silas: A Tale of Bartram-Haugh</Title>
 
<Year>1926-00-00</Year>
 
<Publisher>Oxford University Press</Publisher>
 
<Pages>441</Pages>
 
<Binding>hc</Binding>
 
<PubType>NOVEL</PubType>
 
<Isbn>#306 (World's classics)</Isbn>
 
<Note>OCLC: 56253138 <br>
 
  
Entry based on data from OCLC/Worldcat. (DES May 2008)</Note>
+
::::: Rereading my last response, I see that I may not have been clear. Let me try to expand a bit. I'll use SQLloadAwards in common/SQLparsing.py as an example. Currently the query statement reads:
<Authors>
+
    query = "select * from awards where award_id='%d'" % (award_id)
<Author>Joseph Sheridan Le Fanu</Author>
+
::::: I was considering adding the following globally scoped variable (or property if we put these new values in a class) to common/isfdb.py:
</Authors>
+
    QUERY_AWARD = "award_id, award_title, award_author, award_year, award_ttype, award_atype, award_level, award_movie, award_type_id, award_cat_id, award_note_id"
<Content>
+
::::: We could then change the query statement in SQLloadAwards to:
</Content>
+
    query = "select %s from awards where award_id='%d'" % (QUERY_AWARD, award_id)
</NewPub>
+
::::: Functionally, there should be no change to how the function works. Once we are ready to upgrade to the new connector, we will change the value of QUERY_AWARD to:
</IsfdbSubmission>
+
    QUERY_AWARD = "award_id, award_title, award_author, DATE_FORMAT(award_year, '%Y-%m-%d'), award_ttype, award_atype, award_level, award_movie, award_type_id, award_cat_id, award_note_id"
--> -->
+
::::: Similar global variables could be created for "titles", "authors", "pubs" and any other tables that include "date" columns. Switching from the current connector to the new one will then require a simple change to the QUERY_* variables/properties in common/isfdb.py.
+
::::: Granted, it will only handle "*" queries. The rest will have to be checked and updated manually, but at least they can be found via grep since they are not hidden behind asterisks.
 
<class '_mysql_exceptions.ProgrammingError'> Python 2.5: /usr/bin/python
 
Wed May 28 09:46:11 2008
 
  
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
+
::::: P.S. Another thought. The [https://dev.mysql.com/doc/connector-python/en/connector-python-connectargs.html Python/MySQL converter documentation page] mentions two possibly relevant argument names: "converter_class" and "converter_str_fallback". The first is described as "Converter class to use" and the second one as a False/true flag to "Enable the conversion to str of value types not supported by the Connector/Python converter class or by a custom converter class." Apparently the second one was [https://dev.mysql.com/doc/relnotes/connector-python/en/news-8-0-27.html added in 8.0.27], so it requires Python 3, but it could be the solution that we need. [[User:Ahasuerus|Ahasuerus]] ([[User talk:Ahasuerus|talk]]) 16:58, 3 May 2023 (EDT)
  
/var/www/cgi-bin/edit/submitpub.cgi in ()
+
:::::: OK. Calling out each field works:
  210        else:
 
 
  211                update = "insert into submissions(sub_state, sub_type, sub_data, sub_time, sub_submitter) values('N', %d, '%s', NOW(), %d)" % (MOD_PUB_UPDATE, update_string, submitter_id)
 
 
  212        db.query(update)
 
 
  213
 
 
  214        PrintPostSearch(0, 0, 0, 0, 0)
 
 
db = <_mysql.connection open to 'localhost' at 8223e1c>, db.query = <built-in method query of Connection object at 0x8223e1c>, update = "insert into submissions(sub_state, sub_type, sub...\\n </NewPub>\n</IsfdbSubmission>\n', NOW(), 13372)"
 
  
<class '_mysql_exceptions.ProgrammingError'>: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's classics)</Isbn>\n <Note>OCLC: 56253138 &lt;br&gt;\r\n\r\nEntry based on data fr' at line 1")  
+
    mysql> select award_id, award_title, award_author, DATE_FORMAT(award_year, '%Y-%m-%d'), award_ttype, award_atype, award_level, award_movie, award_type_id, award_cat_id, award_note_id from awards where award_id=1234;
</code>
+
    +----------+---------------------+--------------+-------------------------------------+-------------+-------------+-------------+-------------+---------------+--------------+---------------+
 +
    | award_id | award_title        | award_author | DATE_FORMAT(award_year, '%Y-%m-%d') | award_ttype | award_atype | award_level | award_movie | award_type_id | award_cat_id | award_note_id |
 +
    +----------+---------------------+--------------+-------------------------------------+-------------+-------------+-------------+-------------+---------------+--------------+---------------+
 +
    |    1234 | Another Short Story | Bruce Boston | 2000-00-00                          | Ar          | NULL        | 7          | NULL        |            3 |          21 |          NULL |
 +
    +----------+---------------------+--------------+-------------------------------------+-------------+-------------+-------------+-------------+---------------+--------------+---------------+
  
It loooks to me as if the problem was not due to the link at all. -[[User:DESiegel60|DES]] <sup>[[User talk:DESiegel60|Talk]]</sup> 14:50, 28 May 2008 (UTC)
+
:::::: I am good with that. [[User:Alvonruff|Alvonruff]] ([[User talk:Alvonruff|talk]]) 21:12, 3 May 2023 (EDT)
  
:I'll have a look this evening, but I'd guess that the problem is probably the single quote in the ISBN field. [[User:Alvonruff|Alvonruff]] 16:59, 28 May 2008 (UTC)
+
:::::: Update: I have backed out the previous raw mode code, and have a chunk of biblio up and running at isfdb2.org with the new proposal. The only addition is that we need a different set of variable names for when we have multi-table queries, and start using labels like t.* instead of *. Fortunately, most of the queries use the same format, so I have the following definitions so far:
::That makes sense. When i retried it with that in the notes it went through OK. I was thinking that it might be the parens or the space in that field, which is why i re-tried. -[[User:DESiegel60|DES]] <sup>[[User talk:DESiegel60|Talk]]</sup> 18:59, 28 May 2008 (UTC)
 
  
== Approval warning ==
+
    CNX_AUTHORS_STAR = "author_id, author_canonical, author_legalname, author_birthplace, DATE_FORMAT(author_birthdate, '%Y-%m-%d'), DATE_FORMAT(author_deathdate, '%Y-%m-%d'), note_id, author_wikipedia, author_views, author_imdb, author_marque, author_image, author_annualviews, author_lastname, author_language, author_note"
 +
    CNX_ADOT_AUTHORS_STAR = "a.author_id, a.author_canonical, a.author_legalname, a.author_birthplace, DATE_FORMAT(a.author_birthdate, '%Y-%m-%d'), DATE_FORMAT(a.author_deathdate, '%Y-%m-%d'), a.note_id, a.author_wikipedia, a.author_views, a.author_imdb, a.author_marque, a.author_image, a.author_annualviews, a.author_lastname, a.author_language, a.author_note"
 +
    CNX_TITLES_STAR = "title_id, title_title, title_translator, title_synopsis, note_id, series_id, title_seriesnum, DATE_FORMAT(title_copyright, '%Y-%m-%d'), title_storylen, title_ttype, title_wikipedia, title_views, title_parent, title_rating, title_annualviews, title_ctl, title_language, title_seriesnum_2, title_non_genre, title_graphic, title_nvz, title_jvn, title_content"
 +
    CNX_TDOT_TITLES_STAR = "t.title_id, t.title_title, t.title_translator, t.title_synopsis, t.note_id, t.series_id, t.title_seriesnum, DATE_FORMAT(t.title_copyright, '%Y-%m-%d'), t.title_storylen, t.title_ttype, t.title_wikipedia, t.title_views, t.title_parent, t.title_rating, t.title_annualviews, t.title_ctl, t.title_language, t.title_seriesnum_2, t.title_non_genre, t.title_graphic, t.title_nvz, t.title_jvn, t.title_content"
 +
    CNX_PUBS_STAR = "pub_id, pub_title, pub_tag, DATE_FORMAT(pub_year, '%Y-%m-%d'), publisher_id, pub_pages, pub_ptype, pub_ctype, pub_isbn, pub_frontimage, pub_price, note_id, pub_series_id, pub_series_num, pub_catalog"
 +
    CNX_PDOT_PUBS_STAR = "p.pub_id, p.pub_title, p.pub_tag, DATE_FORMAT(p.pub_year, '%Y-%m-%d'), p.publisher_id, p.pub_pages, p.pub_ptype, p.pub_ctype, p.pub_isbn, p.pub_frontimage, p.pub_price, p.note_id, p.pub_series_id, p.pub_series_num, p.pub_catalog"
  
See [http://www.isfdb.org/cgi-bin/mod/pv_update.cgi?982691 this test submisison]. The pub is marked as being verified agaisnt Locus, but the yellow warning alerts that it has been primary verified. Either the warnin text should change, or the code the triggers it. Ideally, it would show what source a pub had been verified agaisnt, and '''by what editor''' but that may be too much for a bug fix. -[[User:DESiegel60|DES]] <sup>[[User talk:DESiegel60|Talk]]</sup> 22:01, 28 May 2008 (UTC)
+
[[User:Alvonruff|Alvonruff]] ([[User talk:Alvonruff|talk]]) 14:19, 5 May 2023 (EDT)
  
:The first part is fixed - the warning only shows up for primary verified. The other ideas are good, but I can't implement them this morning. [[User:Alvonruff|Alvonruff]] 11:45, 29 May 2008 (UTC)
+
(unindent) Looks promising! (Also, after sleeping on it I realized that leveraging converter_str_fallback would be a bad idea because it would return some date values as "dates" and some as "strings".)
::I figured as much, I think there is a feature request already on the list for them. Thanks. -[[User:DESiegel60|DES]] <sup>[[User talk:DESiegel60|Talk]]</sup> 12:54, 29 May 2008 (UTC)
 
  
:::Okay - the part about displaying the verifier when a verification warning comes up is now fixed and online. [[User:Alvonruff|Alvonruff]] 23:44, 30 May 2008 (UTC)
+
One related consideration that comes to mind is that I have been moving globally scoped constants to the SESSION object/class and its sub-classes, which are defined in common/isfdb.py. For example, all supported currency signs are currently accessed via SESSION.currency.[currency], all supported publication types are found in SESSION.db.pub_types, all non-trivial UI elements are found in SESSION.ui, etc. It prevents namespace pollution as we add more globally scoped constants.
  
::::Wonderful!! -[[User:DESiegel60|DES]] <sup>[[User talk:DESiegel60|Talk]]</sup> 23:55, 30 May 2008 (UTC)
+
If we use the same approach for CNX constants, they would be accessed as SESSION.cnx.authors_star, SESSION.cnx.titles_star, etc. [[User:Ahasuerus|Ahasuerus]] ([[User talk:Ahasuerus|talk]]) 17:20, 5 May 2023 (EDT)
  
== ''Out of the Wild'' and Dissembler? ==
+
== Amazon UK vs. Amazon.com ==
  
Just wondering why Dissembler caught both editions of Sarah Beth Durst's [http://www.isfdb.org/cgi-bin/title.cgi?840367 ''Into the Wild''], but missed the sequel, [http://www.isfdb.org/cgi-bin/title.cgi?888457 ''Out of the Wild''], which I added manually a few minutes ago? Amazon.com seems to have it labeled correctly. [[User:Ahasuerus|Ahasuerus]] 03:21, 1 June 2008 (UTC)
+
A quick note re: Amazon.com as the source of information about UK publications. I am looking at [https://www.isfdb.org/cgi-bin/view_submission.cgi?5633916 this submission] which you created on 2023-04-10 and which used 2023-05-23 as the publication date. As it turns out, 2023-05-23 [https://www.amazon.com/gp/product/1473214890?ie=UTF8&tag=isfdb-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=1473214890 comes from Amazon.com] while Amazon UK [https://www.amazon.co.uk/exec/obidos/ASIN/1473214890/isfdb-21 states that the publication date was 2023-02-16]. Unfortunately, this happens quite often: some UK publishers make their books available in the US weeks or months after their appearance in the UK and vice versa. It's even worse with Australian books, which commonly appear on Amazon.com and Amazon UK months or even years after they were made available in Australia. And, of course, the Amazon store of the country of publication is much more likely to have the right price value for recent edition, although occasionally Amazon lists an Amazon-specific discounted price without mentioning the list price.
  
== Incorrect award link ==
+
The good news is that things are getting better. Some publishers are meticulous about making their books appear on Amazon.com and Amazon UK at the same time. The bad news is that it's nowhere close to 100% (yet.) The Amazon store of the country of publication is still a much more reliable source than other Amazon stores (publisher sites tend to be even better, but they are not as convenient.) It's also the main reason why Fixer and human editors state the source of their data in the Note field -- it helps determine where our data originally came from if we find discrepancies at a later point.
  
The 1977 Locus Award for ''The Best of John W. Campbell'' is linked to the wrong title record.  It should be [http://www.isfdb.org/cgi-bin/title.cgi?857809 the 1976 collection], not the 1973 UK collection with the same title.  Thanks. [[User:Mhhutchins|MHHutchins]] 00:49, 2 June 2008 (UTC)
+
Hope this makes sense! [[User:Ahasuerus|Ahasuerus]] ([[User talk:Ahasuerus|talk]]) 16:07, 23 May 2023 (EDT)
  
:Fixed. [[User:Alvonruff|Alvonruff]] 02:08, 2 June 2008 (UTC)
+
: A few days ago, I went to retroactively add the ebook for this title, and was surprised to see [https://www.isfdb.org/cgi-bin/pl.cgi?946007 an entry] already in the database, even though my tools had highlighted that the ISBN and ASIN were not known.  I also noticed the date issue on the physical, but frankly there were several other issues with these that would probably have caused a moderator comment if they'd come from a regular editor:
 +
: * (Both pubs): price should ideally be in £ given that the publisher is UK based.  I see the hc pub has just been fixed, but the ebook still has this field empty.
 +
: * (Ebook): Page count should not be entered for an ebook, unless it's in a paginated format such as PDF
 +
: * (Ebook): No cover image, even though the entry was sourced from Amazon post publication, so would 99.9999% certainly have had an image
 +
: * (Ebook): No ISBN or ASIN.  Whilst these can be a PITA - e.g. no easy way AFAIK to get an ISBN from Amazon, ASINs may differ between different Amazons - they're obviously super useful for any number of reason
 +
: * (Ebook): No date on the note to indicate when the data came from Amazon.com.  Less of an issue when something is being entered post-publication, but helpful for trying to understand nightmares like [https://www.isfdb.org/cgi-bin/pl.cgi?913449 this]
 +
: I'll fix the ebook shortly, but I dunno if there are likely to be any other similar pubs? [[User:ErsatzCulture|ErsatzCulture]] ([[User talk:ErsatzCulture|talk]]) 16:38, 23 May 2023 (EDT)
  
== SVG plugins ==
+
:: Sorry guys. I was restricting myself to award data, but during the entry of the Aurealis 2022 found a lot of missing data, and did wind up putting in a fair amount of Australian titles so I could get the awards in. This particular title was not nominated, so I'm not sure what attracted me to that particular one. That said, the editing tools absolutely would not accept the Amazon image URL for that particular title, and it still has no ISBN or ASIN, so I'll be interested to see how its resolved. The only other publications entered were related to the Aurealis awards. I'm going to be in Python3 land for the foreseeable future, so you don't have to worry about any more entries. [[User:Alvonruff|Alvonruff]] ([[User talk:Alvonruff|talk]]) 20:43, 24 May 2023 (EDT)
 +
::: ErsatzCulture seems to have updated the book itself so now it has its ASIN and ISBN (and I just added the US-side ASIN as well). Not unusual for the Australian records to be missing - Fixer cannot get them until they show up on the US side and most of them don't or show up a lot later. So unless someone makes it a point to track them down, we usually get them when they get nominated or reissued US or UK side.
 +
::: About the covers - I wonder if you were trying to grab the wrong link from Amazon. In the last year or so, Amazon changed their UI a bit (again) - the main picture in some books (more and more of them) is linked under a very weird address and not necessarily stable address  and there is a smaller thumbprint just under the image which actually links cleanly to the proper address that keeps the picture - the main picture is a link to that one. As a rule, if the thumbprints are under the main cover, the main image is usually the weird address these days. Plus it needs to be cleaned from the formatting. If that is not it, if you remember what you were trying, we may be able to see what may have gone wrong.
 +
::: PS: Glad to see you back around in any capacity. :) [[User:Anniemod|Annie]] ([[User talk:Anniemod|talk]]) 12:04, 25 May 2023 (EDT)
  
There are several plugins available for IE that support SVG, such as the one at the http://www.examotion.com/ site. I downloaded and installed that one and could see your just-added svg charts with no problem. Or SVGs can be created off-line and uploaded as images, and if SVG support has been installed in our copy of the wiki software, they will be rendered as PNGs, accodign to the notes at Mediawiki. -[[User:DESiegel60|DES]] <sup>[[User talk:DESiegel60|Talk]]</sup> 16:46, 6 June 2008 (UTC)
+
== Banners ==
  
== Automatic Attribution for Galactic Central ==
+
I created a banner a couple of years ago for the Japanese SF Magazine, but was told my attempt at writing Data Base in Japanese was wrong. They offered to do better but never got back to me. I have the banner .jpg and constituent elements if you want to take a crack.
  
At this time I've probably linked to ~500 cover images from Galactic Central. I've added a credit to the bottom of every magazine publication page that uses these images, but it would be good to automatically add a credit under the image, as is now done with images from Visco.--[[User:Rkihara|Rkihara]] 17:54, 6 June 2008 (UTC)
+
I've also collected a few covers for Fleuve Noir, and cut out some elements from a half-dozen or so (.xcf format). It's a back burner project, but yet another attempt at internationalization. ../[[User:Holmesd|Doug H]] ([[User talk:Holmesd|talk]]) 12:11, 28 May 2023 (EDT)
  
== Import / Export  ==
+
== Fixer, Windows 10 and isfdb2.org ==
  
Al there is no Export or Import content "Button", I had to use the "Enter" key. This may be a bit confusing for some editors. :-)[[User:Kraang|Kraang]] 03:47, 15 June 2008 (UTC)
+
A quick update re: Fixer, Python 3, MySQL, etc.
  
:There is a "Submit" button at the bottom of the page, but you may have to scroll down a bit. BTW, Al, Ernest Bramah has just called and asked me to thank you :-) [[User:Ahasuerus|Ahasuerus]] 03:54, 15 June 2008 (UTC)
+
Microsoft expects to stop security patches for Windows 10 in 2025 and the current version of Fixer requires Windows 10. With all of the recently requested ISFDB features implemented, I plan to concentrate on migrating Fixer to Linux, Python and MySQL as the next big project. I hope to have it done long before the cut-off date, but you never know what you may run into.
::On the first page where you enter the tag or pub # there is no "Submit" button on this page for me at least. The page it generates with the cloned info. has the "Submit" button at the bottom. My page shows no "errors", would the problem come from me using XP Windows?[[User:Kraang|Kraang]] 12:28, 15 June 2008 (UTC)
 
:::This problem only occurred on Windows Explorer. Now Fixed - button appears. [[User:Alvonruff|Alvonruff]] 12:58, 15 June 2008 (UTC)
 
::::I see it now, '''Stupid''' '''Windows'''! Thanks![[User:Kraang|Kraang]] 15:08, 15 June 2008 (UTC)
 
  
== Error dusplaying image categories ==
+
Since you are working on upgrading the core ISFDB software to Python 3, I plan to use Python 3 for the Fixer rewrite. Could you please provide a copy of the new, Python 3-compatible, code that you are using on isfdb2.org so that I could use it for reference purpose as I design the new Fixer software and/or reset my isfdb2.or password? I tried to log onto isfdb2.org, but my password doesn't appear to be working any more. TIA! [[User:Ahasuerus|Ahasuerus]] ([[User talk:Ahasuerus|talk]]) 10:05, 2 August 2023 (EDT)
  
When a wiki category that includes image fiels is displayed, the following error msg appears in plce of each image thumbnail:
+
: I have recovered my isfdb2.org password; looking at the Python 3 code now :-) [[User:Ahasuerus|Ahasuerus]] ([[User talk:Ahasuerus|talk]]) 17:07, 2 August 2023 (EDT)
  
<code>
+
:: I got Python 3 reading data from the core ISFDB tables under Cygwin. Next I'll create a separate MySQL database for Fixer and see how well it performs with Unicode tables. [[User:Ahasuerus|Ahasuerus]] ([[User talk:Ahasuerus|talk]]) 18:31, 2 August 2023 (EDT)
thumbnail: /var/www/html/wiki//bin/ulimit4.sh: line 4: /usr/local/bin/convert: No such file or directory
 
</code>
 
  
I looks to me as if some part of the path used by default to strore dynamically create thumbnail images does not exist. -[[User:DESiegel60|DES]] <sup>[[User talk:DESiegel60|Talk]]</sup> 14:09, 16 June 2008 (UTC)
+
::: Since you have it working you probably don't need any pointers, but I'm working out of /home/alvonruff/Python3. The build system needs to be primed with a 'make python3' on a new system (which touches a .pythonver file). There's also a relatively recent copy on isfdb.org in /home/avonruff/Python3 (just in case). [[User:Alvonruff|Alvonruff]] ([[User talk:Alvonruff|talk]]) 22:04, 2 August 2023 (EDT)
For examples, see [[:Category:Test Cat 1]] and [[:Category:Fair use images]]. -[[User:DESiegel60|DES]] <sup>[[User talk:DESiegel60|Talk]]</sup> 14:10, 16 June 2008 (UTC)
 
  
:This requires installing ImageMagick, which has dependencies requiring the installation of 11 other packages, each of which has some unknown number of additional dependencies, and so on. Which translates to: I haven't had a few hours to burn on this one yet. [[User:Alvonruff|Alvonruff]] 23:24, 16 June 2008 (UTC)
+
:::: Thanks for the tip! [[User:Ahasuerus|Ahasuerus]] ([[User talk:Ahasuerus|talk]]) 22:14, 2 August 2023 (EDT)
::Oh really? That's a '''lot''' more work than I would have guessed. Sorry. Can we turn off thumbnaling in cats and jsut display the file/page name until/unless this is installed, or is that a lot of work too? -[[User:DESiegel60|DES]] <sup>[[User talk:DESiegel60|Talk]]</sup> 23:51, 16 June 2008 (UTC)
 
::According to [http://www.mediawiki.org/wiki/Manual:%24wgCategoryMagicGallery this media wiki page], setting $wgCategoryMagicGallery to off should avoid the error msgs. -[[User:DESiegel60|DES]] <sup>[[User talk:DESiegel60|Talk]]</sup> 23:59, 16 June 2008 (UTC)
 
  
:::Well - it's interesting. Not what I expected on your test page (prints an h3 'I'). [[User:Alvonruff|Alvonruff]] 00:56, 17 June 2008 (UTC)
+
::::: By the way, there is a file in the mod directory call fixup.py. To do a first pass at porting a file you can:
::::That is normal. I set up the test in a very quick and dirty way, and did not provide a pipe alias for the apges. Thus each of them is indexed under therei full page name, which begins "Image:..." so all the pages are sorted under "I" for "Image". Look at [[:Category:Fair use images]]. for a better view. I'll change the links that feed [[:Category:Test Cat 1]] to make it look more reasonable. -[[User:DESiegel60|DES]] <sup>[[User talk:DESiegel60|Talk]]</sup> 18:23, 17 June 2008 (UTC)
+
::::: * Turn on the do_tabs variable, and set do_str and do_mysqldb to zero. Then run against the target file. It will produce a file called OUT, with all tabs converted to spaces.
::::Have a look at [[:Category:Test Cat 1]] now. -[[User:DESiegel60|DES]] <sup>[[User talk:DESiegel60|Talk]]</sup> 18:27, 17 June 2008 (UTC)
+
::::: * Run futurize -f print <file>. This will convert all the calls to print. Only.
 +
::::: * Turn off the do_tabs variable, and turn on the others. This will port all the SQL calls (mostly). You'll need to remove all instances of REMOVE_THIS_LINE, and then check if the emitted DB_FETCHMANY's should be DB_FETCHONE's. But otherwise it saves a lot of time. [[User:Alvonruff|Alvonruff]] ([[User talk:Alvonruff|talk]]) 22:49, 2 August 2023 (EDT)
  
::::: That looks a lot more usable to me! Not sure how well it would work with a few thousand images though. But we definitely don't want thumbnails until there's a manageable number of selections to choose from. [[User:BLongley|BLongley]] 21:25, 17 June 2008 (UTC)
+
:::::: Grabbed it, thanks!
::::::You may not be aware that wiki categories always limit any given display page to no more than 200 items, with links to "next" and "previous" pages as needed. -[[User:DESiegel60|DES]] <sup>[[User talk:DESiegel60|Talk]]</sup> 23:51, 17 June 2008 (UTC)
 
  
== Web API and bad submissions ==
+
:::::: So my current (still tentative) plan is to convert Fixer in stages:
 +
::::::# Move Fixer's data from "data stores" to MySQL tables. At that point the Fixer software will be talking to MySQL using ODBC.
 +
::::::# Rewrite the current version of the Fixer software in Python 3, which will eliminate Windows dependencies and make it possible for other developers to maintain/upgrade Fixer's code if something happens to me. The UI will still be "roll-and-scroll" at that point.
 +
::::::# Upgrade Fixer's Amazon interface to support multiple concurrent users, which will require a single-threaded request queue due to Amazon throttling.
 +
::::::# Upgrade the UI from "roll-and-scroll" to regular HTML.
 +
::::::# Integrate the new HTML interface with the ISFDB code; leverage ISFDB/Wiki account authentication.
 +
::::::# Deploy the new Fixer on isfdb2.org and make it available to moderators.
 +
:::::: Based on the above, I plan to use the wrapper class (MYSQL_CONNECTOR) that you developed for ISFDB during stages 2-5. The difference is that:
 +
::::::* I will be using Python 3 from the get-go, and
 +
::::::* Fixer is already using Unicode
 +
:::::: so the connection settings will be a bit different, but it shouldn't be a big deal.
  
I was playing with the Web API yesterday night and one of my submissions, [http://www.isfdb.org/cgi-bin/mod/dumpxml.cgi?993590 993590], was accepted, but then it caused problems in the submission queue and I had to reject it.
+
:::::: Re: fixup.py and the Python 3 upgrade project, how far along would you say it is? It sounds like the heavy lifting has been done and it's just a matter of testing everything on isfdb2.org, right? [[User:Ahasuerus|Ahasuerus]] ([[User talk:Ahasuerus|talk]]) 08:27, 3 August 2023 (EDT)
  
If you look at the XML dump that I linked above, the problem was with the ISBN field or rather with the fact that the first ISBN tag was malformed. You'd think that the Web API would have rejected a submission with a bad tag, but it was accepted twice. As far as I was able to determine, all tags were properly formed in the "problem" submission except that there was no space before the <Isbn> tag, which apparently confused the Web API. Is this enough information to diagnose the problem or should I experiment with other submission permutations tonight? Thanks! [[User:Ahasuerus|Ahasuerus]] 20:30, 17 June 2008 (UTC)
+
::::::: The per-script status can be found [[User:Alvonruff/Python3_ISFDB2|here]]. /biblio is complete and tested on both python3 and python2. /edit is complete and tested on python3 and about 75% tested on python2. /mod is about 75% complete. /rest will go rapidly. I haven't cracked open /nightly or /scripts yet. Progress is slow lately, as I've been in physical therapy to regain the full use of my hands, so my typing time is somewhat limited. Nonetheless, after completing the rough port, we can begin checking in changes that do not require python3 (tabs/spaces, print(), the db interface changes), which is why we need to ensure that the changes work on both python2 and python3. After that, the total number of changes are small, so we should be able to integrate, then switch over to python3. We'll have the ability to switch back to python2 if we encounter some issue that requires some time to fix.
  
:In dump linked to above, the first few tags are as follows:
+
::::::: That said, I don't plan on checking in the whole mess all at once. But there's nothing stopping us from starting to integrate some of the changes. For instance the, tabs/spaces project can start now (which is a pretty good project itself, given that some of the indentation is very mixed and ambiguous to an automated tool, and it would be good to make that change in isolation). [[User:Alvonruff|Alvonruff]] ([[User talk:Alvonruff|talk]]) 07:04, 4 August 2023 (EDT)
<code><nowiki>
 
<Submitter>Ahasuerus</Submitter>Isbn>1575661292</Isbn><Subject>Lady of the Glen: A Novel of 17th-Century Scotland and the Massacre of Glencoe</Subject> </nowiki></code>
 
  
:The Isbn tag is lacking the first angle bracket (<), so I presume it would not have been recognized as a tag at all. I don't know if this was also true in the source. -[[User:DESiegel60|DES]] <sup>[[User talk:DESiegel60|Talk]]</sup> 20:40, 17 June 2008 (UTC)
+
:::::::: Thanks for the update! Sorry to hear about the issues with your hands. On the plus side physical therapy can be very effective these days. Due to all the typing that I do, I have had some issues with my hands and shoulders over the last 10 years, but have been able to recover every time. Knock on wood.
 +
:::::::: Re: /nightly , most of it is pretty straightforward:
 +
::::::::* There are 330+ cleanup reports, but most of them use "standardReport" to talk to MySQL, so a single change should take care of the vast majority of reports.
 +
::::::::* Report 288 uses slightly different SQL syntax depending on whether you are running MySQL 5.x or MySQL 8.x; we can check the former on my development server, which is running 5.5 on Windows/Cygwin.
 +
::::::::* The "monthly" job, which looks for potential author duplicates, is currently disabled on the live server for performance reasons. The algorithm that I used doesn't scale well: what took hours to do when we had 50,000 authors takes days now that we have 250,000+ authors. There are ways to test it under Python 3, of course, e.g. by deleting all but 10,000 author records, but the algorithm really needs to be replaced before we re-enable the monthly job.
 +
::::::::* The code that runs nightly reconciliation with SFE uses urllib2, so it will need to be tweaked.
 +
::::::::* The code that rebuilds the list of front page pubs uses SQLparsing.py.
 +
::::::::* The code that updates database statistics uses 3 dozen custom SQL queries, which will need to be updated.
 +
:::::::: Re: "starting to integrate some of the changes" and making the tab/spaces change a separate sub-project, I'll be happy to assist any way I can. Just let me know how you want to structure it. [[User:Ahasuerus|Ahasuerus]] ([[User talk:Ahasuerus|talk]]) 12:08, 4 August 2023 (EDT)
  
::Al's code checks for malformed XML in submissions and rejects them out of hand -- as I know all too well after sending more than my fair share of bad submissions yesterday :) The fact that this submission got through and the fact that (as far as I could tell) it had the first angle bracket on my side suggests that there is something wrong when processing Isbn tags. Also, when there was a space before (<Isbn), the submission was properly created, so it seems to point to a problem with the Web API. As an aside, it would be great if the Web API generated more specific error messages when rejecting submissions, but I assume that it may take additional work. [[User:Ahasuerus|Ahasuerus]] 20:52, 17 June 2008 (UTC)
+
== Fixer's Amazon API and Python 3 ==
  
::: I DREAM of meaningful error messages! At work, we've just given up on Internet Explorer 6 not working with the latest upgrade to our Web-App. After ''two months'' of testing, we've still not got a meaningful error message from it, it just freezes: and every other browser works fine. So IE6 goes into the sin-bin along with IE4 and Netscape 2 and other dinosaurs and we'll go back to actually enhancing our system rather than waste time figuring out what broke IE6. Of course, this takes us back into dealing with systems sending us XML that doesn't conform to the XSD or DTD they claim to comply with (the validation performance is so bad they switch it off, and don't even turn it back on for ''testing'' of later versions it seems), but I'm getting used to rewriting XSDs to match reality. I may even try the ISFDB Web API soon, but I'll let you Alpha testers do a bit more first. ;-) [[User:BLongley|BLongley]] 21:39, 17 June 2008 (UTC)
+
Fixer's implementation of the Amazon API (built on top of Amazon's reference implementation) has been upgraded to work with both 2.7 and 3.9. Lessons learned:
 +
* At least under Cygwin, Python 3 uses a different default encoding for roll-and-scroll interfaces. I needed to run:
 +
** sys.stdout.reconfigure(encoding='iso-8859-1')
 +
* when Fixer invoked Python 3 via a system call and redirected output to a file. Note that "reconfigure" was implemented in Python 3.7 and may not work in earlier versions. Everything may have worked out of the box if Fixer was using "file write" commands instead of simple "print" commands, but I don't plan to change it because the whole thing will be rewritten in native Python soon-ish.
 +
* Python 3 changed the way Python compares strings and integers. In Python 2, <i>"1" > 1</i> was "True" because any "string" value was greater than any "int" value. In Python 3 it generates a TypeError. It's a good thing, but it threw me for a loop for a bit.
 +
[[User:Ahasuerus|Ahasuerus]] ([[User talk:Ahasuerus|talk]]) 14:24, 7 August 2023 (EDT)
  
::::This one is my error. The code that removes the license key (so others can't see it in the submission queue) had an off by one error, removing an extra character. My submissions have newlines and spaces, so the missing character wasn't missed. FIXED. [[User:Alvonruff|Alvonruff]] 23:40, 17 June 2008 (UTC)
+
== "mw_objectcache" in the ISFDB Wiki - abnormal growth ==
  
:::::Excellent! Fixing the multiverse one bug at a time :) [[User:Ahasuerus|Ahasuerus]] 23:54, 17 June 2008 (UTC)
+
We have been struggling with an odd disk space issue for the last few weeks. Here is what I have found so far.
  
== Merged Story Indicator ==
+
The ISFDB Wiki uses the MySQL table [https://www.mediawiki.org/wiki/Manual:Objectcache_table mw_objectcache] as its caching mechanism. Apparently the choice of MediaWiki's caching mechanism is controlled by the value of $wgMainCacheType in /var/www/html/wiki/LocalSettings.php . We currently have it set to "CACHE_ANYTHING", which, according to [https://www.mediawiki.org/wiki/Manual:$wgMainCacheType MediaWiki documentation], translates to "CACHE_DB", i.e. "mw_objectcache", on our system:
  
Love all the new stuff, especially the linked reviews and the efficient manner in which they were attached in batch mode but there is one subject which has created a constant, continuing headache for us all - merged titles which are changed universally when changing a single entry. It would really be a help if there were an indicator in Publication Editor mode and, perhaps more importantly, on the submission screen indicating that editing the title information (title, author, entry type, or length) or approving the submission will result in changes in multiple publications. An asterisk next to the title line with a note at the bottom of the screen might be an idea. Thanks.--[[User:Swfritter|swfritter]] 17:30, 19 June 2008 (UTC)
+
* CACHE_ANYTHING – Use $wgMessageCacheType or $wgParserCacheType if they are set to something other than CACHE_NONE or CACHE_ANYTHING. Otherwise use CACHE_DB.
:I agree. Occasionally this is desired, but all to often it is an error, with potentially far-reaching consequences. -[[User:DESiegel60|DES]] <sup>[[User talk:DESiegel60|Talk]]</sup> 17:35, 19 June 2008 (UTC)
+
* CACHE_DB – Use the database table objectcache.
  
== WorldCat and legal issues ==
+
A few weeks ago I noticed that we were running low on disk space. Running:
 +
<source>
 +
sudo ls -lah /var/lib/mysql/isfdb|grep G
 +
</source>
  
Al, you may want to take a look at [http://www.isfdb.org/wiki/index.php/ISFDB:Community_Portal#Worldcat_issues this discussion] if you haven't done so already. I doubt a boring copyright case would trump your grandfather's exploits during the Prohibition, but still... [[User:Ahasuerus|Ahasuerus]] 03:15, 26 June 2008 (UTC)
+
identified the culprit:
  
== recent changes to [[:Template:A]]  ==
+
<source>
 +
-rw-r----- 1 mysql mysql  2.2G Aug 28 13:47 mw_objectcache.MYD
 +
</source>
  
I noted you were using [[:Template:A]] on your user page just now. You may not have noticed, i modifed this template so the user no longer needs to supply underscores for spaces, the template now makes that conversion automatically. -[[User:DESiegel60|DES]] <sup>[[User talk:DESiegel60|Talk]]</sup> 13:54, 3 July 2008 (UTC)
+
Since I truncated mw_objectcache just a couple of days ago, it means that it is abnormally large and growing rapidly.
  
:Thanks! [[User:Alvonruff|Alvonruff]] 12:07, 5 July 2008 (UTC)
+
Running:
 +
<source>
 +
select DATE(exptime),count(*) from mw_objectcache group by DATE(exptime)
 +
</source>
  
== Erroring submissions ==
+
produced the following results [last run a couple of hours ago]:
 +
<source>
 +
+---------------+----------+
 +
| DATE(exptime) | count(*) |
 +
+---------------+----------+
 +
| 2023-08-28 | 47160 |
 +
| 2023-08-29 | 79942 |
 +
| 2023-08-30 |  115 |
 +
| 2023-08-31 |  110 |
 +
| 2023-09-01 |  102 |
 +
| 2023-09-02 | 2434 |
 +
| 2023-09-03 |  167777 |
 +
| 2023-09-04 | 73630 |
 +
| 2023-09-23 |  10 |
 +
| 2023-09-24 |  49 |
 +
| 2023-09-25 |  670 |
 +
| 2023-09-26 | 17734 |
 +
| 2023-09-27 | 12892 |
 +
| 2024-08-25 |  87 |
 +
| 2024-08-26 |  97 |
 +
| 2024-08-27 |  99 |
 +
| 2038-01-19 |  58 |
 +
+---------------+----------+
 +
</source>
 +
It looks like some Wiki processes which update mw_objectcache set the expiration time to 24 hours, while other processes set it to 1 week, 1 month or even 1 year. ("2038-01-19" is a known issue with JavaScript and doesn't happen often.)
  
There's nasty Python errors on [http://www.isfdb.org/cgi-bin/mod/dumpxml.cgi?1003113 this] for instance. Something to do with changes from two authors (both pseudonyms) to one, I guess. [[User:BLongley|BLongley]] 20:43, 4 July 2008 (UTC)
+
I have checked the date/time stamp on LocalSettings.php and it hasn't been changed since December 2022, so it shouldn't be causing this issue. Would you happen to be aware of any other Wiki-related changes which may have happened over the last month?
  
:This is another example of deleting an author with the space key. The space allows the author string to be accepted, but the leading/trailing spaces are deleted later, resulting in a NULL author. FIXED. [[User:Alvonruff|Alvonruff]] 12:06, 5 July 2008 (UTC)
+
If we can't identify and fix the problem then I guess we'll need to modify the daily backup script to TRUNCATE mw_objectcache right before the backups kick in. [[User:Ahasuerus|Ahasuerus]] ([[User talk:Ahasuerus|talk]]) 14:00, 28 August 2023 (EDT)
  
== ''Carrion Comfort'' and ''Phases of Gravity'' ==
+
:I don't think here has been any Wiki-related changes since the move. There have been a handful of similar complaints about mw_objectcache over the years elsewhere, but didn't find anything recent or very useful in terms of the root cause. Running the query on isfdb2 shows similar results:
  
Another question about the Warner Books edition of [http://www.isfdb.org/cgi-bin/pl.cgi?CACO1989 ''Carrion Comfort''], which you re-verified last month. Is it a true first printing, i.e. does the number line under the words "First Warner Books Printing: October 1990" go from 10 to 1, or does it stop at a higher number? For example, mine stops at 4, which makes it a fourth printing. [[User:Ahasuerus|Ahasuerus]] 00:44, 7 July 2008 (UTC)
+
<source>
 +
mysql> select DATE(exptime),count(*) from mw_objectcache group by DATE(exptime);
 +
+---------------+----------+
 +
| DATE(exptime) | count(*) |
 +
+---------------+----------+
 +
| 2023-08-30    |    2465 |
 +
| 2023-08-31    |    3821 |
 +
| 2023-09-01    |      84 |
 +
| 2023-09-02    |    2468 |
 +
| 2023-09-03    |  107963 |
 +
| 2023-09-04    |    1966 |
 +
| 2023-09-05    |    4590 |
 +
| 2023-09-06    |    2207 |
 +
| 2023-09-23    |      14 |
 +
| 2023-09-24    |      32 |
 +
| 2023-09-25    |      637 |
 +
| 2023-09-26    |    11788 |
 +
| 2023-09-27    |      376 |
 +
| 2023-09-28    |      837 |
 +
| 2023-09-29    |      419 |
 +
| 2024-08-25    |      89 |
 +
| 2024-08-26    |      54 |
 +
| 2024-08-27    |        1 |
 +
| 2038-01-19    |      34 |
 +
+---------------+----------+
 +
</source>
  
:It goes from 10 to 1, and states above the number line: "First Warner Books Printing: October, 1990" [[User:Alvonruff|Alvonruff]] 00:57, 8 July 2008 (UTC)
+
:The cache is also large there:
  
::Ah, so it's a true first printing, nice! Mine also says "First Warner Books Printing: October, 1990", but the number line stops at 4. I am sure publishers have all kinds of excellent reasons to keep the date of the first printing on the copyright page of subsequent printings, but it can easily confuse the rest of us :( [[User:Ahasuerus|Ahasuerus]] 02:35, 8 July 2008 (UTC)
+
<source>
 +
    -rw-r----- 1 mysql mysql 1139418628 Aug 30 10:11 mw_objectcache.MYD
 +
</source>
  
P.S. After entering and verifying my fourth printing version of ''Carrion Comfort'', I realized that I  had created a duplicate of my previously verified pub and deleted it. However, my "Top Verifier" score remained the same, which suggests that deleting a Verified publication has no effect on that counter. Is that by design or do we want to decrement the verifier's counter when one of his verified publications is deleted? [[User:Ahasuerus|Ahasuerus]] 00:53, 7 July 2008 (UTC)
+
: [[User:Alvonruff|Alvonruff]] ([[User talk:Alvonruff|talk]]) 10:13, 30 August 2023 (EDT)
  
:It's a product of evolution, not intelligent design... I'll patch it up (and some others) when I put in support for multiple verifications. [[User:Alvonruff|Alvonruff]] 00:57, 8 July 2008 (UTC)
+
:: Thanks for checking isfdb2.org; I didn't think of that.
  
::Multiple verification = Very Good!! [[User:Ahasuerus|Ahasuerus]] 02:35, 8 July 2008 (UTC)
+
:: For now, I have modified the backup script to use "--ignore-table=mw_objectcache", which should take care of the immediate issue with the daily backup files getting large and not fitting on a single DVD disc. (I also back them up online, on a USB stick, on an SSD drive and on an external hard drive, but non-magnetic media that can't be easily erased is another line of defense.)
  
P.P.S. Re: [http://www.isfdb.org/cgi-bin/pl.cgi?BKTG16519 ''Phases of Gravity''], does your copy have a new afterword by Simmons? Also, the only date stated in my third printing of the Bantam Spectra edition is "May 1989", i.e. the date of the first printing of the Bantam Spectra edition. Did you take the date, 1991-03-00, from the [http://www.locusmag.com/index/b437.htm#A6352 Locus Index] and, if so, does it mean that your copy is a second printing as per their description? [[User:Ahasuerus|Ahasuerus]] 01:05, 7 July 2008 (UTC)
+
:: Curiously, checking the disk space, I see that mw_objectcache is only 77MB as of 5 minutes ago. I truncated it yesterday night and it should be much larger 18 hours later based on what we have seen over the last few weeks. I wonder if the changing growth pattern may be due to various Web spiders accessing different subsets of the MediaWiki Wiki pages which get cached with different expiration dates based on whatever algorithms the PHP code is using.
  
:Mine is the third printing as well. This was verified 4 days after the verification feature went online, and I don't think we had settled into tracking different printings with the same ISBN yet. Feel free to modify at will to bring up to current standards. [[User:Alvonruff|Alvonruff]] 00:57, 8 July 2008 (UTC)
+
:: Oh well, something to keep an eye on going forward. Thanks for checking! [[User:Ahasuerus|Ahasuerus]] ([[User talk:Ahasuerus|talk]]) 13:12, 30 August 2023 (EDT)
  
::Ah, I see! OK, I'll reshuffle them in a moment, thanks! [[User:Ahasuerus|Ahasuerus]] 02:35, 8 July 2008 (UTC)
+
== DDOS protection ==
  
== Chap(ter)books and some basic design issues ==
+
Yesterday (2023-09-11) the live site was targeted by malicious robots. They hammered the site for about an hour, then stopped. They returned this afternoon (2023-09-12) at 12:30pm.
  
Al, could you please take a look at [http://www.isfdb.org/wiki/index.php/ISFDB:Community_Portal#The_30.2C000_ft_view my summary of this discussion] of Chap(ter)books and associated fundamental database design issues when you have a chance? A number of bandaid solutions have been proposed, but we probably need to make some basic decisions about the direction that we want to take the application in before we do anything. Thanks! [[User:Ahasuerus|Ahasuerus]] 23:27, 23 July 2008 (UTC)
+
Here are the specifics as far as I could tell:
  
== Change to your verified pub Analog Science Fiction and Fact, January/February 2007  ==
+
# A three-digit number of concurrent processes. It wasn't enough to make the site unavailable, but it slowed everything down to a crawl.
 +
# Originating IPs from multiple countries, including multiple Chinese provinces.
 +
# Random access to random Web pages, both on the Wiki side and on the database side.
 +
# All types of pages were accessed on the database side -- display, add, delete, clone, vote, unmerge, etc.
  
I added cover scans to this issue. [[User:Tpi|Tpi]] 09:09, 24 July 2008 (UTC)
+
Coming on the heels of the [https://www.librarything.com/topic/353456 LibraryThing and related DDOS attacks] over the Labor Day weekend -- which included demands for ransom money -- this is disconcerting. We are not as big as LibraryThing, but the number of estimated monthly accesses to our site is within an order of magnitude. If a hobbyist site like LibraryThing can be attacked, other hobbyist sites may be in danger as well.
  
== Change to your verified pub Analog Science Fiction and Fact, April 2007  ==
+
It's possible that the attackers were just poorly configured Web crawlers, but I would bet that they were fishing for vulnerabilities to DDOS and/or SQL injection attacks. Apparently you can [https://heimdalsecurity.com/blog/ddos-as-a-service-attacks-what-are-they-and-how-do-they-work/#:~:text=DDoS%2Das%2Da%2Dservice%20is%20part%20of%20the%20cybercrime,services%20on%20the%20Dark%20Web. buy a DDOS attack cheaply] these days, but it still costs money, so the attackers needed to have a business plan as opposed to doing it on a whim. I suppose it's also conceivable that the attackers were state-sponsored actors who were looking for vulnerable sites to add to the list of sites to take down if and when the sponsoring state decides to pull the trigger, but the fact that they returned today makes it less likely. Not that it really makes a difference from our perspective.
  
I added cover scan to this issue. [[User:Tpi|Tpi]] 10:15, 25 July 2008 (UTC)
+
Based on the above, I think it makes sense to look into possible countermeasures. The fact that we are small fish in a big ocean may no longer provide us with the same kind of protection that it did in the past. Cloudfare is apparently the leading provider in this area and their introductory plans [https://www.cloudflare.com/plans/ are not too expensive], but the devil is in the details. Perhaps other companies may be a better match for us. I know little about this area, so I am just mentioning what I have seen so far. [[User:Ahasuerus|Ahasuerus]] ([[User talk:Ahasuerus|talk]]) 13:27, 12 September 2023 (EDT)
  
== Asimov's, September 2007 ==
+
== Death's Head ==
  
I think there's a stray editor title in there? [[User:BLongley|BLongley]] 20:05, 25 July 2008 (UTC)
+
You are PV1 for this title: https://www.isfdb.org/cgi-bin/pl.cgi?97321 I just submitted the following edit: Submitting two external IDs (LCCN & Goodreads), three webpage reviews, & added material to the pub note. Cheers. [[User:Hifrommike65|Mike]] ([[User talk:Hifrommike65|talk]]) 22:51, 7 October 2023 (EDT)
 
 
2007 EDITOR Reflections: Saddam Wasn't the Worst Robert Silverberg
 
2007 ESSAY Reflections: Saddam Wasn't the Worst Robert Silverberg
 
 
 
:FIXED. [[User:Alvonruff|Alvonruff]] 22:55, 25 July 2008 (UTC)
 
 
 
:: Cheers! I get less and less confident about magazines as time goes on, but big yellow warnings still help. [[User:BLongley|BLongley]] 23:04, 25 July 2008 (UTC)
 
 
 
== Problem with editing the verification table ==
 
 
 
There seems to be a problem with editing the verification list (http://www.isfdb.org/cgi-bin/mod/editrefs.cgi). I was attempting to add Bleiler78, in accord with [[ISFDB:Moderator noticeboard#Adding Bleiler's Checklist to the Verification Source]]. I could not make a new line stick. there were error msgs about missing UIRLs for earlier entries, so i created and entered relevant Reference pages for thsoe that did not have outside URLs, and converted old tamu.edu URLs to www.isfdb.org. Erro msgas stopped, but still no luck. Also "Primary (Transient)" is ID #17, and there are no IDs 14, 15, or 16 listed. I can't get a URL for 17 to stick, nor an entry for 18 at all. And by the way, what is the functiion of the URLs, nothing seems to display or use them? Also, what is the function of the Pub Id field? None of the lines currently have a non-blank Pub Id. Help please? -[[User:DESiegel60|DES]] <sup>[[User talk:DESiegel60|Talk]]</sup> 05:31, 17 August 2008 (UTC)
 
 
 
== Darwin's Radio ==
 
 
 
Bluesman has submitted an update to your verified ''{{p|159941|name=Darwin's Radio}}'' to change
 
* Catalog # from #02066 to #03066
 
* Note:<br>SFBC #02066. No price and ISBN.<br>SFBC #03066. ISBN same as publisher's edition.
 
 
 
I'd approve it but am puzzled you could not find an ISBN and Bluesman seems to have done so.
 
 
 
I suspect the best place to reply for this issue is at [[User talk:Bluesman#Darwin's_Radio]] <span style="border: 1px solid #f0f; border-bottom: none; padding: 0 2px">[[User:Marc Kupper|Marc&nbsp;Kupper]]&nbsp;([[User talk:Marc Kupper|talk]])</span> 05:14, 5 September 2008 (UTC)
 
 
 
:I think the way SFBC books are entered has evolved over time to include the ISBN, but I've personally only been entering SFBC catalog numbers, so I don't think the original note is mine. Nonetheless, it's quite clear that the book is catalog #03066 and DOES have an ISBN - there's an ISBN box on the back cover. So, can't explain the record's current state, but the change sounds like a good one. [[User:Alvonruff|Alvonruff]] 11:38, 9 September 2008 (UTC)
 
 
 
== Problem with XML output from wiki ==
 
 
 
I had some problems using the AutoWikiBrowser tool, which I reported at [http://en.wikipedia.org/wiki/Wikipedia_talk:AutoWikiBrowser/Bugs#AWB_encountered_XmlException_on_custom_project this wikipedia page]. The response was: "Your MW API install is borked: it prepends newline to XML output, scaring the .NET's XML parser to death." I don't know what if anythign you can do about this, nor how hard it might be. -[[User:DESiegel60|DES]] <sup>[[User talk:DESiegel60|Talk]]</sup> 01:19, 8 September 2008 (UTC)
 
 
 
:Hmmm. Seeing as how I know nothing about AutoWikiBrowser, MW API, or borking, should be fairly trivial, no? Can't promise any quick responses, but I'll look at it as time permits. [[User:Alvonruff|Alvonruff]] 11:33, 9 September 2008 (UTC)
 
::Figured I'd report it in case the newline was a trivial fix, but this is '''not''' vital. AWB is a tool, not an essential -- it basically allows doing wiki edits in a semi-automated form -- and I can still use it as things are, there is merely one convenient feature that doesn't work. If you have limited time, i'd frankly rahter you concentreated on the verification table isue mentiuons a couple of sections up. -[[User:DESiegel60|DES]] <sup>[[User talk:DESiegel60|Talk]]</sup> 00:23, 10 September 2008 (UTC)
 
 
 
== Dissembler omission? ==
 
 
 
I read in ''Lunnaya Pravda''... er, I mean I have just read a review of Ekaterina Sedia's [http://www.amazon.com/Alchemy-Stone-Ekaterina-Sedia/dp/0809572842/ ''The Alchemy Of Stone''] in [http://www.locusmag.com/Features/2008/08/locus-magazines-faren-miller-reviews.html ''Locus'']. Amazon.com has it listed under both Science Fiction and Fantasy, so I wonder why Dissembler missed it earlier this year? [[User:Ahasuerus|Ahasuerus]] 22:16, 1 October 2008 (UTC)
 
 
 
:Dissembler also missed [http://www.isfdb.org/cgi-bin/pe.cgi?24924 all of Piers Anthony's ''ChroMagic'' books] in 2003-2008. [[User:Ahasuerus|Ahasuerus]] 16:50, 28 October 2008 (UTC)
 
 
 
::Oh, I see, no browse nodes! That's very sloppy of Amazon, but let me see if I can come up with a sub-400 Power search on Subjects and years... [[User:Ahasuerus|Ahasuerus]] 17:10, 31 October 2008 (UTC)
 
 
 
:::OK, Powersearch should work for our purposes if you use a subject line like "fantasy" in conjunction with "pubdate:during MM-YYYY" since it's very unlikely that you will get more than 4,000 hits per month. However, Amazon's US (and only US, apparently) Webservice is currently broken: all pages higher than 100 return the same text, so you are effectively limited to 1,000 hits and that's not enough for traditionally high volume months like September. I suppose you could (ab)use "binding" to get a smaller subset, but the list of allowed values is not published and even if was, plugging "Leather Bound", "Library Binding" and "Loose Leaf" in the query is kludgey. Oh well, at least it should get us 90%+ of the missing pubs.
 
 
 
:::Will you have the time/inclination to update Dissembler in the foreseeable future or should I throw something together on my end and use the Web interface to submit the missing pubs? Recreating the anti-comic/RPG logic would be the only really painful part, I think. [[User:Ahasuerus|Ahasuerus]] 00:16, 1 November 2008 (UTC)
 
 
 
== Spam Filter ==
 
 
 
Please take a look at [[User talk:DESiegel60#Spam filtered]]. Thank you. -[[User:DESiegel60|DES]] <sup>[[User talk:DESiegel60|Talk]]</sup> 19:12, 2 October 2008 (UTC)
 
 
 
== Oddity with import ==
 
 
 
I had added two essay that a reliable secondary source (the author's web site) told me were present to the 1st printing of a book ({{T|2647|''The Seven Altars of Dusarra''}} by {{A|Lawrence Watt-Evans}} actually.) The same source told me those essays were also included in subsequent printings (and other editions) for which we already had records, but records that did not include the essays. So i used the import function to import the content from the first printing to the second. It copied the records for the essays, alright, but it also imported a second copy of the record for the Novel. And remove titles won't remove the "main" title, the one that is the title reference. So i figured I'd change this to a different type (Poem), remove one of the two records, and change it back. Not so fast. When i changed it, remove listed the two poem records, but when i removed one, both went. So i added a new version of the novel, and merged the two titles. All is OK. But it seems to me that import shouldn't import a 2nd copy of a record that is identical to an existing copy, and remove should allow deletion of one of two identical records. -[[User:DESiegel60|DES]] <sup>[[User talk:DESiegel60|Talk]]</sup> 05:05, 30 October 2008 (UTC)
 
 
 
== Singularity Sky ==
 
 
 
Added $C price to your verified {{P|SNGLRTYSKY2004}}. How's the de-bugging going?--[[User:Bluesman|Bluesman]] 19:19, 9 November 2008 (UTC)
 
 
 
== Anderson's Jedi Academy Trilogy ==
 
 
 
I've updated [http://www.isfdb.org/cgi-bin/pl.cgi?104621 your verified pub] of this title with the publisher's imprint (GuildAmerica) and added the ISBN, moving the SFBC number to the notes. Can you check to see if these are actually stated in the pub?  Thanks. [[User:Mhhutchins|MHHutchins]] 20:05, 31 December 2008 (UTC)
 
 
 
: Noticed this as I was leaving a note. The ISBN is on the copyright page only and the SFBC# is on the back cover. ~Bill, --[[User:Bluesman|Bluesman]] 05:24, 5 January 2009 (UTC)
 
 
 
== The Time Ships ==
 
 
 
Have added some notes to {{P|TISI1996}}  as to first printing, number line. Also added the roman numeral pages to the page count: xi+ and put what was in them into the contents. Cheers! ~Bill, --[[User:Bluesman|Bluesman]] 05:18, 5 January 2009 (UTC)
 
 
 
: Update approved. All of the notes after the first line are new plus the roman numeral pages. --[[User:Marc Kupper|Marc Kupper]]|[[User talk:Marc Kupper|talk]] 05:29, 5 January 2009 (UTC)
 
 
 
== Otherness ==
 
 
 
Added a couple of notes to {{P|OTHE1994}} re:first printing & number line, and the $C price. Cheers! ~Bill, --[[User:Bluesman|Bluesman]] 00:40, 9 January 2009 (UTC)
 
 
 
:Approved. 02:41, 9 January 2009 (UTC)
 
 
 
== Parable of the Sower ==
 
 
 
Added a couple of notes to {{P|BKTG22370}} re: first edition, full number line and the C$ price. ~Bill, --[[User:Bluesman|Bluesman]] 22:39, 10 January 2009 (UTC)
 
 
 
: Approved --[[User:Marc Kupper|Marc Kupper]]|[[User talk:Marc Kupper|talk]] 00:15, 11 January 2009 (UTC)
 
 
 
== Oddity with import  [2] ==
 
 
 
Bluesman found another Gotcha with Import ([http://www.isfdb.org/wiki/index.php/User_talk:Bluesman#Home_from_the_Shore see here]). Apparently he tried importing the contents of one NOVEL into another to get the notes (which didn't work of course) and then got confused when the two NOVELs in one pub resulted in two records showing for that one publication under the title. He noticed that he verified one and two apparently got verified by him, so tried to delete one. It's only because he commented on the double-verifying that I caught it. I left an example {{T|960349|here}} - there's really only two publications there, not three. Maybe this problem could be bumped up the priority list a bit when you have time? [[User:BLongley|BLongley]] 19:39, 16 January 2009 (UTC)
 
 
 
== Ill Wind ==
 
 
 
Added a cover image to {{P|ILWND1995}} and notes about edition/printing, artwork and the $C price. ~Bill, --[[User:Bluesman|Bluesman]] 05:11, 3 February 2009 (UTC)
 
 
 
== 2010 ==
 
 
 
Added a cover image and notes to {{P|DSSTWTNQCT1982}} ~Bill, --[[User:Bluesman|Bluesman]] 20:33, 4 February 2009 (UTC)
 
 
 
== New Space Opera ==
 
 
 
Added some notes, edition/printing to {{P|THNWSPCPRW2007}} ~Bill, --[[User:Bluesman|Bluesman]] 18:59, 10 February 2009 (UTC)
 
 
 
== Prelude to Foundation ==
 
 
 
Added a cover image to {{P|BKTG08155}} ~Bill, --[[User:Bluesman|Bluesman]] 20:17, 11 February 2009 (UTC)
 
 
 
== Robots of Dawn ==
 
 
 
Added a cover image to {{P|BKTG08170}} and changed the catalogue number to #1965. My copy has this number, no '0', and the four-digit #s preceded the five-digit ones. ~Bill, --[[User:Bluesman|Bluesman]] 21:12, 11 February 2009 (UTC)
 
 
 
== Manifold Time ==
 
 
 
Added a cover image and artist to {{P|MANFTIME2000B}} ~Bill, --[[User:Bluesman|Bluesman]] 22:45, 11 February 2009 (UTC)
 
 
 
== Darwin's Radio [2] ==
 
 
 
Added a cover image and notes to {{P|DRWNSRDXMN1999}} ~Bill, --[[User:Bluesman|Bluesman]] 00:20, 12 February 2009 (UTC)
 
 
 
== Foundation & Chaos ==
 
 
 
Added a cover image and a note to {{P|FNDTNNDCHB1998}} ~Bill, --[[User:Bluesman|Bluesman]] 04:33, 12 February 2009 (UTC)
 
 
 
== Foundation's Fear ==
 
 
 
Added a cover image to {{P|BKTGA0105}}~Bill, --[[User:Bluesman|Bluesman]] 05:19, 12 February 2009 (UTC)
 
 
 
== Saturn's Children artist ==
 
 
 
The credited artist for [[http://www.isfdb.org/cgi-bin/pl.cgi?STRNSCHLDC2008 this]] pub is Scott Grimando. I have the 1st trade HC which matches the cover in the pub record but that name doesn't appear anywhere in/on the book. Joe Williamsen is credited. Wrong image or incorrect credit? ~Bill, --[[User:Bluesman|Bluesman]] 00:55, 3 March 2009 (UTC)
 
 
 
== Halting State ==
 
 
 
Has the SFBC gotten more expensive since the last time I was a member? [[http://www.isfdb.org/cgi-bin/pl.cgi?HLTNGSTTNT2007 This]] has a price of $24.95, same as the trade HC. I may never join again! ;-) ~Bill, --[[User:Bluesman|Bluesman]] 03:25, 3 March 2009 (UTC)
 
 
 
== Quicksilver And System of the World ==
 
 
 
*I updated the notes on your verified pub {{P|QCKSLVR2003}} - Thanks [[User:Kpulliam|Kevin]] 05:41, 5 March 2009 (UTC)
 
*I updated the notes and the cover art link for your verified pub {{P|TSSTMFTWR2004}} - Thanks [[User:Kpulliam|Kevin]] 05:50, 5 March 2009 (UTC)
 
 
 
== Nightfall and Other Stories ==
 
 
 
Added a cover image to [[http://www.isfdb.org/cgi-bin/pl.cgi?NGHTFLLNDT1969]]--[[User:Bluesman|Bluesman]] 03:11, 8 March 2009 (UTC)
 
 
 
== Mother of Storms ==
 
 
 
Added a cover image to [[http://www.isfdb.org/cgi-bin/pl.cgi?MTST1994]] ~Bill, --[[User:Bluesman|Bluesman]] 23:42, 8 March 2009 (UTC)
 
 
 
== Manifold: Space ==
 
 
 
Added a cover image to [[http://www.isfdb.org/cgi-bin/pl.cgi?MANFSPACE2001B]]. The page count in the pub record differs from the one in Locus. I didn't change it. ~Bill, --[[User:Bluesman|Bluesman]] 16:01, 10 March 2009 (UTC)
 
 
 
== Variant cover image ==
 
 
 
Al - Since you verified this: http://www.isfdb.org/cgi-bin/pl.cgi?STRNSCHLDC2008, I think we need to talk. I have a copy with a completely different cover. The covers don't appear to be by the same artist (completely different styles) even though the credit is the same. All other data (that you verified) is the same.
 
 
 
Have you seen the seen the second version (rather voluptuous young lady facing to the right and dressed in at least a partial exoskeleton with tubing running into her back)? I have it ready to upload/replace the existing link.
 
 
 
What would you suggest?
 
 
 
Regards -
 
--[[User:Dsorgen|Dsorgen]] 02:38, 11 March 2009 (UTC)
 
 
 
: Like the one [http://www.grimstudios.com/SGrimandowebPage/SaturnsChildren.html here]? [[User:BLongley|BLongley]] 18:06, 11 March 2009 (UTC)
 
 
 
:: Looks quite like [http://www.grimstudios.com/SGrimandowebPage/TheThinker.html this] too. [[User:BLongley|BLongley]] 18:11, 11 March 2009 (UTC)
 
 
 
== The Mightiest Machine -- cover image ==
 
 
 
I added [http://www.fantasticfiction.co.uk/images/n0/n3724.jpg this image] to your verified {{P|MGTSTMC1965}} that matches my copy of the same edition.  --[[User:MartyD|MartyD]] 12:08, 14 March 2009 (UTC)
 
 
 
== Otherness [2] ==
 
 
 
Added a cover image to [[http://www.isfdb.org/cgi-bin/pl.cgi?OTHE1994]] ~Bill, --[[User:Bluesman|Bluesman]] 21:48, 14 March 2009 (UTC)
 
 
 
== Voyage ==
 
 
 
Added a cover image and the month of publication (from Locus1) to [[http://www.isfdb.org/cgi-bin/pl.cgi?VOYAGE1997]] ~Bill, --[[User:Bluesman|Bluesman]] 04:28, 15 March 2009 (UTC)
 
 
 
== Mightiest Machine [2] ==
 
 
 
Added a cover image to [[http://www.isfdb.org/cgi-bin/pl.cgi?MGTSTMC1965]] ~Bill, --[[User:Bluesman|Bluesman]] 18:10, 17 March 2009 (UTC)
 
 
 
== Imajica price question ==
 
 
 
Hi.  In your verified entry {{P|BKTG14664}}, is a price of $23.00.  Is that printed on the cover somewhere or in the bar code?  I have a copy that matches all of the other details, except it has no price anywhere.  I'm thinking it's probably a book club edition of some sort.  I figure if yours has a price on it, that will be a good indication.... Thanks.  --[[User:MartyD|MartyD]] 11:08, 29 March 2009 (UTC)
 
 
 
:No price on mine either, so I can't be sure anymore where the price came from. The binding doesn't look like a book club edition (cloth spine, embossed imprinting on the front board, nicely cut pages), but that doesn't mean it isn't. The tags that start with BKTG are pretty old (at least 10 years), but were mostly verified against Locus. [[User:Alvonruff|Alvonruff]] 00:38, 8 July 2009 (UTC)
 
 
 
== Crash ==
 
 
 
Added a cover image and month/printing (from Locus1) to [[http://www.isfdb.org/cgi-bin/pl.cgi?BKTG13049]] The printing may not match the pub, but none was stated and this is the only pub Locus listed for that year. ~Bill, --[[User:Bluesman|Bluesman]] 23:46, 4 June 2009 (UTC)
 
 
 
== Seventh Son ==
 
 
 
There were two identical entries, except for the notefield, for the first paperback of Seventh Son [http://www.isfdb.org/cgi-bin/pl.cgi?SESO1987B yours] and [http://www.isfdb.org/cgi-bin/pl.cgi?SVNTHSNWPS1988 another one]. I copied the notes from the second entry to your edition, and deleted the other one. Thanks [[User:Willem H.|Willem H.]] 21:02, 16 June 2009 (UTC)
 
:Also added [http://www.isfdb.org/wiki/index.php/Image:SESO1987B.jpg this cover scan]. [[User:Willem H.|Willem H.]] 15:05, 13 October 2009 (UTC)
 
 
 
== Altered Carbon - Richard 'K.'? Morgan ==
 
 
 
I was upgrading a book today and realized I had transient verified your primary verified copy of {{P|ALTRDCRBN2003|Altered Carbon}}.  The record however has the author as Richard Morgan, but my copy of the same is as by Richard K. Morgan.  Could you check your copy to confirm this typo? - Thanks [[User:Kpulliam|Kevin]] 21:31, 7 July 2009 (UTC)
 
 
 
:It has a 'K' on this version. I've fixed. [[User:Alvonruff|Alvonruff]] 00:32, 8 July 2009 (UTC)
 
 
 
::Based on your response, I also went ahead and moved the verified pub from the No K. title, to the With K. Variant title. Thanks for checking! [[User:Kpulliam|Kevin]] 02:22, 9 July 2009 (UTC)
 
 
 
== The Demolished Man -- cover and notes added ==
 
 
 
I added some notes, a cover image, and a content record for the introduction by Harry Harrison to {{P|38272|your verified pub}}. -[[User:DESiegel60|DES]] <sup>[[User talk:DESiegel60|Talk]]</sup> 00:30, 20 July 2009 (UTC)
 
 
 
== The Time Ships (HarperPrism, pb) ==
 
 
 
Hi Al. You verified this pub ({{P|TISI1996}}). I'm confused about the date of publication (Jan 95) - which is mentioned again in the notes. I always thought the HarperCollins hardcover edition ({{P|TISI1995A}}) was the first publication of this novel. You also verified that pub against Locus1. But [http://www.locusmag.com/index/b43.htm#A449 Locus Online states] Jan 96 as the date of the HarperPrism paberback - which seems plausible, since all the other HarperPrisms I know came out a while after their British counterparts by HarperCollins or HarperVoyager. Could this be a typo in the publication entry or even the book itself? Can you re-check this? Thanks. --[[User:Phileas|Phileas]] 13:18, 8 September 2009 (UTC)
 
 
 
== Added artist credit ==
 
 
 
I added cover credit to your verified [http://www.isfdb.org/cgi-bin/pl.cgi?BKTG08183].[[User:Don Erikson|Don Erikson]] 22:31, 26 September 2009 (UTC)
 
 
 
== The Voyage of the Sable Keech ==
 
 
 
I added [http://www.isfdb.org/wiki/index.php/Image:THVGFTHSBT2006.jpg this cover scan] to [http://www.isfdb.org/cgi-bin/pl.cgi?88817 this verified pub]. Thanks, [[User:Willem H.|Willem H.]] 13:57, 14 October 2009 (UTC)
 
 
 
== The Regulators ==
 
 
 
Added some notes to [http://www.isfdb.org/cgi-bin/pl.cgi?RGLTR1996A your verified pub] to match my copy. Thanks [[User:Willem H.|Willem H.]] 18:37, 14 October 2009 (UTC)
 
 
 
== Prentice Alvin ==
 
 
 
I added [http://www.isfdb.org/wiki/index.php/Image:PRAL1989B.jpg this cover scan] to [http://www.isfdb.org/cgi-bin/pl.cgi?26585 this verified pub]. Thanks, [[User:Willem H.|Willem H.]] 09:12, 16 October 2009 (UTC)
 
 
 
== The Regulators ==
 
 
 
I added [http://www.isfdb.org/wiki/index.php/Image:RGLTR1996A.jpg this cover scan] to [http://www.isfdb.org/cgi-bin/pl.cgi?46002 this verified pub]. Thanks, [[User:Willem H.|Willem H.]] 09:54, 18 October 2009 (UTC)
 
 
 
== Thirteen (Black Man) ==
 
 
 
I added some notes to [http://www.isfdb.org/cgi-bin/pl.cgi?99021 your verified pub] to match my copy. Thanks, [[User:Willem H.|Willem H.]] 14:43, 18 November 2009 (UTC)
 
 
 
== Year's Best SF 12  ==
 
 
 
For {{p|99291|Year's Best SF 12}}
 
* Added more notes such as about the Canadian price.
 
* Added note as the source of the cover artist is unknown. I've messages MHutchinson as he has the hc edition.
 
* Added cover image.
 
* Changed ''Counterfactual'' from by Gardner Dozois to be by Gardner R. Dozois.
 
* Changed ''Expedition, With Recipies'' to ''Expedition, with Recipies''. --[[User:Marc Kupper|Marc Kupper]]|[[User talk:Marc Kupper|talk]] 10:04, 6 December 2009 (UTC)
 
 
 
== Crashcourse  -  add cover image/notation ==
 
 
 
Morning! This. [http://www.isfdb.org/cgi-bin/pl.cgi?8174]. I added a cover image, [http://ecx.images-amazon.com/images/I/51GMRBWTMXL.jpg], and notation after matching my copy to your ver. Thanks, Harry. --[[User:Dragoondelight|Dragoondelight]] 13:20, 23 December 2009 (UTC)
 
 
 
== Glory Road ==
 
 
 
Added LCCN and start page to {{P|252082|Glory Road}} [[User:Dcarson|Dana Carson]] 09:25, 21 February 2010 (UTC)
 
 
 
 
 
== Craddle of splendor ==
 
 
 
Added cover scan to [http://www.isfdb.org/cgi-bin/pl.cgi?BKTGA0036 here] [[User:Hauck|Hauck]] 18:27, 26 February 2010 (UTC)
 
 
 
 
 
== The line of polity ==
 
 
 
I uploaded a different scan (with blurb) than the amazon-based one [http://www.isfdb.org/cgi-bin/pl.cgi?THLNFPLTVV2004 here], does it match with your copy ? [[User:Hauck|Hauck]] 18:41, 27 February 2010 (UTC)
 
 
 
 
 
== The engineer reconditonned ==
 
 
 
I replaced the amazon scan by an ISFDB-based one on your verified [http://www.isfdb.org/cgi-bin/pl.cgi?THNGNRRCND2005 here]. Copyright page says 2006, do you thinf it's coherent with the 2005 date ? [[User:Hauck|Hauck]] 18:27, 1 March 2010 (UTC)
 
 
 
 
 
== Prador moon ==
 
 
 
I replaced the amazon scan by an ISFDB-based one on your verified [http://www.isfdb.org/cgi-bin/pl.cgi?82829 here] which is slightly different (top blurb has only three lines instead of four. [[User:Hauck|Hauck]] 18:31, 1 March 2010 (UTC)
 
 
 
== Orbital resonance ==
 
 
 
I replaced the amazon scan by an ISFDB-based one on your verified [http://www.isfdb.org/cgi-bin/pl.cgi?RBRS1992 here], added note. [[User:Hauck|Hauck]] 18:08, 2 March 2010 (UTC)
 
 
 
== Welcome back! ==
 
 
 
Hopefully you don't mind all the little changes we've made... [[User:BLongley|BLongley]] 18:51, 7 March 2010 (UTC)
 
 
 
: My God! Look what you've done with the place! [[User:Alvonruff|Alvonruff]] 19:01, 7 March 2010 (UTC)
 
 
 
::Oh, it's not as bad as it looks. The red stuff on the ceiling is paint rather than blood. Well, for the most part. [[User:Ahasuerus|Ahasuerus]] 20:14, 7 March 2010 (UTC)
 
 
 
: Took me a while to remember my password for the server so I could download some files that aren't checked in. Got the database up and running on MacOS yesterday. Probably not qualified to be a real moderator any more... [[User:Alvonruff|Alvonruff]] 19:01, 7 March 2010 (UTC)
 
 
 
::There have been a lot of minor fixes but relatively few major changes in the last 9 months. There is a complete list of changes at [[Development/Archive/2009]] and [[Development/Recent Patches]], but briefly:
 
 
 
::*User Preferences have been implemented but are still rather rudimentary
 
::*You can now delete empty Series and unlink Series from their Superseries
 
::*You can now remove invalid Author Pseudonyms
 
::*Remove Title lets you remove all Titles, including duplicates and container titles
 
::*Import/Export/Clone have been reworked, but the core functionality remains the same
 
::*Edit Pub no longer allows editors to change constituent Titles if they also appear in other Pubs (the most popular change so far)
 
::*CHAPTERBOOKs have been re-enabled at the Title level to allow documenting standalone appearances of Shortfiction and Essays -- comparable to the way Clute/Nicholls show Chapbooks in their Encyclopedia. A little kludgy, but it was the best we could come up with.
 
::*Summary and Series pages adjusted to behave the same way and show "only appeared as", "also appeared as", etc correctly
 
::*AND NOT disabled in Advanced Searches due to serious performance problems -- you were planning to redo Advanced Search at some point, right?
 
::*SERIALs are now handled as Variant Titles -- "lexical match" is gone
 
::*"Concise Listing" added in View Pub
 
::*Moderators can no longer cross-approve other moderator's Held submissions by accident. Moderators can Unhold their submissions.
 
::*Users can cancel their submissions before they are approved/rejected
 
::*Magazines now link to their parent Series (or to the EDITOR Title if it's not in a Series)
 
::*Forthcoming Books has been revamped to make it more user-friendly
 
::*"Check for Duplicates" is now smarter
 
::*Various policy tweaks, but nothing earth-shaking
 
 
 
::Foreign Language support is still on hold. I was hoping to get it done by the end of 2009, but my ISFDB time has been increasingly limited the last few months :( [[User:Ahasuerus|Ahasuerus]] 20:14, 7 March 2010 (UTC)
 
 
 
::: Yeah, it's mostly Ahasuerus's fault. ;-) I just added lots more links so Moderators can check things before approving, or can move on to other approvals quicker. Oh, and I did a fair bit of the Chapterbook reenablement to avoid the lengthists killing the bookists, or vice versa. (Self preservation maybe?) But we haven't had too many Mods disappear since the changes, so it's probably mostly better than worse. (We do seem to have a lot of Mods with medical problems, myself included, though - so any more stress-relieving improvements are still welcome.) [[User:BLongley|BLongley]] 22:26, 7 March 2010 (UTC)
 
 
 
== Barrayar ==
 
 
 
I replaced the amazon scan by an ISFDB-based one on your verified [http://www.isfdb.org/cgi-bin/pl.cgi?3622 here] and added note aboiut excerpt. Hervé [[User:Hauck|Hauck]] 13:44, 12 March 2010 (UTC)
 
 
 
== Look to Windward ==
 
 
 
Uploaded cover scan on your verified [http://www.isfdb.org/cgi-bin/pl.cgi?20605 here] and added note. [[User:Hauck|Hauck]] 10:51, 13 March 2010 (UTC)
 
 
 
== Award editor? ==
 
 
 
Earlier today an editor asked whether it's possible to enter/edit awards -- see the last question on [[ISFDB:Help desk]]. As I recall, you deployed it one point, but had to pull it the following day due to a few destructive bugs that were still lurking under the surface. I was wondering if it's something that you may be planning on reviving? I haven't done anything with awards (except cleaning up a few  links) since I figured it was dangerous to mess with an unfinished product. [[User:Ahasuerus|Ahasuerus]] 22:30, 15 March 2010 (UTC)
 
 
 
:It's basically usable. It's not dangerous, merely user-unfriendly. Since awards categories are not standardized (even across a single award, such as the Hugos), it's up to the submitter to make sure that nominees and winners go under the same lexical title, otherwise they won't be properly grouped. Probably needs some documentation before someone tries to use it. It's still online, and the tools appear in the editing navbar - well, only for me. There is a check in the navbar code that only displays those options for my particular login.
 
 
 
::Yes, I saw it in the code when I was polishing the navbar and let the sleeping dogs lie :) Ahasuerus 03:05, 16 March 2010 (UTC)
 
 
 
:We could always enable awards editing for the interested party and see what happens. We would have to find the userid of the interested party and add them to biblio/common.py in the section with the comment "This link only appears for Al von Ruff". [[User:Alvonruff|Alvonruff]] 00:37, 16 March 2010 (UTC)
 
 
 
::We have a few folks who have a development copy of ISFDB set up locally, so if you tell them what/where to tweak, they may be able to test the basic functionality before we let it loose on an unsuspecting world. I'd do it myself, but I have about 7,000 miles to cover over the next 9 days, so I will be away from my main development server most of the time.
 
 
 
::Also, is my understanding correct that the drop-down list of awards is currently hard-coded? I expect that if you add all regional and foreign language awards, the total will be in the hundreds, so eventually we may need something more robust than a single list defined in the software. Ahasuerus 03:05, 16 March 2010 (UTC)
 
 
 
:::Oh. You wanted to do it right. That would require creating a new table to hold the awards names (currently in Python dictionaries), getting rid of all award_ttype references (those 2 letter codes), and adding editing apps for the new table. I'll think about that. [[User:Alvonruff|Alvonruff]] 12:08, 16 March 2010 (UTC)
 
 
 
== Prayers to Broken Stones ==
 
 
 
Added an image to [[http://www.isfdb.org/cgi-bin/pl.cgi?PTBS1992 this]] ~Bill, --[[User:Bluesman|Bluesman]] 21:48, 10 May 2010 (UTC)
 
 
 
== Halting State  [2]==
 
 
 
Changed the month of [[http://www.isfdb.org/cgi-bin/pl.cgi?HLTNGSTTNT2007 this]] record, source Locus1, amended the notes. ~Bill, --[[User:Bluesman|Bluesman]] 23:33, 5 June 2010 (UTC)
 
 
 
== Eternity ==
 
 
 
Added a cover scan and notes for your verified [http://www.isfdb.org/cgi-bin/pl.cgi?12603 here]. [[User:Hauck|Hauck]] 13:33, 26 June 2010 (UTC)
 
 
 
== Hyperion ==
 
 
 
Added a cover scan and notes for your verified [http://www.isfdb.org/cgi-bin/pl.cgi?17600 here]. [[User:Hauck|Hauck]] 17:28, 5 July 2010 (UTC)
 
 
 
== Snow Crash ==
 
 
 
Added a cover scan and notes for your verified [http://www.isfdb.org/cgi-bin/pl.cgi?30944 here]. [[User:Hauck|Hauck]] 16:32, 8 July 2010 (UTC)
 
 
 
== Paradox ==
 
 
 
Added a cover scan and notes for your verified [http://www.isfdb.org/cgi-bin/pl.cgi?253899 here]. [[User:Hauck|Hauck]] 13:29, 16 August 2010 (UTC)
 
 
 
== Galactic Empires ==
 
 
 
Replaced the amazon scan on your verified [http://www.isfdb.org/cgi-bin/pl.cgi?258211 here]. [[User:Hauck|Hauck]] 15:09, 10 September 2010 (UTC)
 
 
 
== Analog Science Fiction and Fact, March 2007  ==
 
 
 
I added a cover scan, and changed the credit for "Brass Tacks" From "Stanley Schmidt" to "uncredited". [[User:Tpi|Tpi]] 16:18, 14 October 2010 (UTC)
 
 
 
== Awards ==
 
 
 
We have another new editor [http://www.isfdb.org/wiki/index.php/ISFDB:Help_desk#SQL_for_award_names_.28eg_.22Hugo.22_or_.22Nebula.22.29 asking about award names] - I've pointed him at the Schema documentation, but wondered if you're going to be changing the Award functionality anytime soon, or are you keeping that task for yourself for now? (I saw some new Hugo awards being entered.) [[User:BLongley|BLongley]] 18:54, 27 December 2010 (UTC)
 
 
 
: Just started trying data entry to see if anything has broken recently - only issue I see so far is some brokeness in common.py displaying authors that don't have entries - which only really happens on awards (made a quick online patch for that). I'll go through a couple of years of Hugos. Normally the big issue with awards is missing bibliographic data, such as collections or anthologies and tracking that data down. Otherwise I'll start typing up more details on award entries. [[User:Alvonruff|Alvonruff]] 19:00, 27 December 2010 (UTC)
 
 
 
:: OK - glad to see that the Awards page I knocked up is coming in useful at last. I'll let you get on with the edits in peace. (Although if you're going to be doing the Stoker awards anytime soon, note that those seem to be awarded for titles published the same year - the unlinked awards seem to have assumed prior year.) [[User:BLongley|BLongley]] 19:59, 2 January 2011 (UTC)
 
 
 
:::I'm also doing a general cleanup, which never really happened when the awards were converted over to the new database. As part of that, I plan on aligning the dates with Mark R. Kelly's dates. Stoker award dates will need to move 1 year forward to match up. There was much discussion about what the date should be (date awarded, date eligible, etc), but there is no real consistency between the various awards. Looks like Kelly and Grubbs had that discussion again, and decided on a different criteria. [[User:Alvonruff|Alvonruff]] 20:12, 2 January 2011 (UTC)
 
 
 
: That probably didn't answer your question directly. I don't currently plan on making any code/schema changes. I need to catch up on the current development process before sticking my fingers in it. [[User:Alvonruff|Alvonruff]] 19:04, 27 December 2010 (UTC)
 
 
 
:: Great news! Sorry about the broken author links for Award -- that was probably my patch from a couple of weeks ago which changed author URLs from names to internal IDs. Names are still supported, but IDs work better since  "URLs with IDs" don't have the Unicode problems that "URLS with names" have.
 
 
 
:: As far as the development process goes, the outline on the main Development page (linked from the Community Portal) is out of date and needs to be updated to reflect the current practice. The short version is as follows (assuming I don't forget anything since it's almost 3am on the East Coast):
 
 
 
::* A Bug or Feature Request ("FR") is created in SourceForge. Anyone can do it, even "anonymous".
 
::* In theory, the bug/FR is assigned to a developer based on discussions on the Development page, but in reality we have had so few people involved lately that this step is skipped and developers just grab bugs/FRs when they have some time to work on them.
 
::* A developer identifies the scripts that are affected and lists the Bug/FR (along with the scripts) on the Development page under "Outstanding Changes", e.g. it currently lists the scripts that I am adding Javascript validation to.
 
::* The developer makes his changes locally, tests them, checks them into SourceForge and posts the new version numbers on the Development page.
 
::* The administrator (me in 2009-2010) downloads the changes to his local development server and tests them.
 
::* If everything works fine, the administrator uses the CVS "tag" command to tag the script(s) that will go into the next build, e.g. "cvs tag r2010-80 script.py". Usually a build includes one or two changes, although occasionally the number is higher. Builds follow the 2010-NN naming convention and we are up to 2010-80 for the year.
 
::* The administrator signs on to the live server and uses the CVS "export" command to download all scripts for the latest build/tag to a new directory, e.g. "cvs export -r r2010-80 -d r2010-80 isfdb2"
 
::* The administrator tar's the directory up, e.g. "tar -cvf r2010-80.tar *", copies the tarball to /home/avonruff/isfdb2/, untars it and types "make install" (or "make -B install" if the build added new scripts and such.)
 
::* The administrator moves the tarball to an archive, but that's just housekeeping
 
::* The administrator marks the Bug/FR as "Fixed/Completed" in SourceForge.
 
::* The administrator moves the completed changes from the list of Outstanding Changes on the Development page to the "Recent Patches" sub-page. "Recent Changes" covers all builds for the current year, so it's a useful page for developers to review.
 
 
 
:: It sounds a bit convoluted, but I guess I have grown used to it and my fingers remember the sequence, so it takes just minutes to go through the motions. The details can be easily changed, but I think the key thing is to make sure that all changes to the live server are committed to the SourceForge CVS repository or else subsequent patches may overwrite "uncommitted" changes and all hell will break loose. [[User:Ahasuerus|Ahasuerus]] 08:09, 28 December 2010 (UTC)
 
 
 
::P.S. I have updated the Development page with a slightly modified version of the outline above. BTW, I am working on JavaScript validation at the moment and I wonder what you think about extricating JS functions from the current Python-based code generator (isfdblib.py) and putting them in ".js" files. It seems like it may improve performance since .js files will be cached and it will definitely make coding easier. [[User:Ahasuerus|Ahasuerus]] 08:25, 28 December 2010 (UTC)
 
 
 
:::I'm all for whatever is easier. [[User:Alvonruff|Alvonruff]] 17:08, 28 December 2010 (UTC)
 
 
 
== Unicode fixes ==
 
 
 
When you get a chance, could you please review my last post on [[Talk:Development]]? It's about Unicode, our perennial favorite. TIA! [[User:Ahasuerus|Ahasuerus]] 02:16, 4 January 2011 (UTC)
 
 
 
== Awards for non-existing authors ==
 
 
 
I was reviewing a few award pages and [http://www.isfdb.org/cgi-bin/ay.cgi?Au2000 one of them] errored out. It turned out that it's due to a change that I made in common.py in December -- I had forgotten that we allow authors who are not defined in the Author table. Sorry about that, I will fix it tonight. [[User:Ahasuerus|Ahasuerus]] 00:28, 15 January 2011 (UTC)
 
 
 
: I did a little work on enabling "Reviewed Author" searches, but even after that I still find authors existing for no apparent reason. Any ideas on why these exist? [[User:BLongley|BLongley]] 01:18, 15 January 2011 (UTC)
 
 
 
:: I have seen cases when a record was left in "canonical_author" after the last title/pub was deleted. I haven't been able to recreate the bug, though. [[User:Ahasuerus|Ahasuerus]] 01:41, 15 January 2011 (UTC)
 
 
 
::: The bug has been squashed, quashed and otherwise terminated. [[User:Ahasuerus|Ahasuerus]] 02:17, 16 January 2011 (UTC)
 
 
 
== Interface cover image ==
 
 
 
I uploaded a cover image for your verified {{P|18336|Interface}}. [[User:AndonSage|AndonSage]] 05:37, 21 February 2011 (UTC)
 
 
 
== Amazon, Createspace, and image linking ==
 
 
 
Hi Al, Ahasuerus says you're the only one who would know the answer to this: See {{P|346864|Worlds Without End: The Mission}}.  If [http://www.createspace.com Createspace] is an Amazon company, is linking to images hosted there permitted under ISFDB's arrangement with Amazon?  Thanks, --[[User:MartyD|MartyD]] 11:26, 18 March 2011 (UTC)
 
 
 
:A cursory look into this leads me to believe that linking to the images would not be permitted. Our arrangement is via the Affiliate Program, which allows use of specific Amazon assets. Createspace, although owned by Amazon, is a separate standalone business unit with their own terms and conditions, including:
 
 
 
    You may not frame or utilize framing techniques to enclose any trademark, logo, or other proprietary information (including images,
 
    text, page layout, or form) of our site and our affiliates without express written consent.
 
 
 
[[User:Alvonruff|Alvonruff]] 23:55, 26 March 2011 (UTC)
 
 
 
::I figured it might be something along those lines.  Looks like the image is now available on Amazon, so I will switch it to that.  Thanks for looking into it for me.  --[[User:MartyD|MartyD]] 01:35, 27 March 2011 (UTC)
 
 
 
== Analog 1966-04 ==
 
 
 
Replaced the Visco scan for your verified [http://www.isfdb.org/cgi-bin/pl.cgi?56777 here]. [[User:Hauck|Hauck]] 15:50, 28 May 2011 (UTC)
 
 
 
== Analog 1965-01 ==
 
 
 
Replaced the Visco scan for your verified [http://www.isfdb.org/cgi-bin/pl.cgi?56753 here]. [[User:Hauck|Hauck]] 16:42, 28 May 2011 (UTC)
 
 
 
== ''After Gas, Are We Ready for the End of Oil?'' ==
 
 
 
You are the verifier for the [http://www.isfdb.org/cgi-bin/pl.cgi?90991 Jan-Feb 2007 Analog]. Those contents list an essay as being titled [http://www.isfdb.org/cgi-bin/title.cgi?633941 "After Gas, Are We Ready for the End of Oil?"]. We also had an entry for "After Gas: Are We Ready for the End of Oil?", and the Locus Awards page lists it in this later form (semi-colon instead of comma). I've merged those two essays under the title with the comma, but I'm hoping you'll check to verify that this is how it ''should'' be listed. Thanks, [[User:Chavey|Chavey]] 21:31, 31 May 2011 (UTC)
 
 
 
== ''The Clan of the Cave Bear'', by Jean Auel ==
 
 
 
I added the month of publication to this book, as listed in a later edition of the book. From that edition (May, 1982), I also added the note that there were 4 printings of that edition in the first two months. [[User:Chavey|Chavey]] 03:55, 15 June 2011 (UTC)
 
 
 
== Asimov's Science Fiction, December 2007 ==
 
 
 
Sightly changed the title of Jones' story from _Do (This)_ to _Do(This)_ (space dropped), in [http://www.isfdb.org/cgi-bin/pl.cgi?252085 this pub].
 
 
 
== David Brin - Earth ==
 
 
 
I added amazon linked art to your verified pub {{P|11736|Earth}}. - Thanks [[User:Kpulliam|Kevin]] 02:39, 28 October 2011 (UTC)
 
 
 
== SFBC ed. of ''The Stars, Like Dust'' ==
 
 
 
Can you check your copy of [http://www.isfdb.org/cgi-bin/pl.cgi?BKTG08183 this pub] and see if it has a gutter code?  It should be printed someone on or near the last page of text.  Thanks. [[User:Mhhutchins|Mhhutchins]] 19:02, 9 January 2012 (UTC)
 
 
 
:I'm in the process of moving again (back to Illinois), so I'm not near my books... and I've been ruthlessly pruning my collection, so I may not have it anymore. Will check next time I visit my house. [[User:Alvonruff|Alvonruff]]
 
 
 
== Pyr vs Pyr / Prometheus ==
 
 
 
Hi, I changed the publisher for [http://www.isfdb.org/cgi-bin/pl.cgi?253899 this book] from Pyr into Pyr / Prometheus as back cover, title page and copyright page all mention ''Pyr, an imprint of Prometheus Books'', the spine being the only place that only mentions Pyr. --[[User:Dirk P Broer|Dirk P Broer]] 10:00, 5 February 2012 (UTC)
 
 
 
== The Golden Age Wright 2003 ==
 
 
 
Hi, my copy of this [http://www.isfdb.org/cgi-bin/pl.cgi?88727 pub] has 'Dramatis personae' on pages up to vii, which seems missing in the record you verified and the page number is 406, with an excerpt of 'The phoenix exultant' starting from page 399. --[[User:Pips55|Pips55]] 22:45, 22 February 2012 (UTC)
 
 
 
== Quicksilver Stephenson 2003 ==
 
 
 
Hi, I added details, cover and corrected the price in this [http://www.isfdb.org/cgi-bin/pl.cgi?89609 pub]. --[[User:Pips55|Pips55]] 23:52, 1 March 2012 (UTC)
 
 
 
== Managing Tags ==
 
 
 
There is a discussion [http://www.isfdb.org/wiki/index.php/ISFDB:Help_desk#How_does_one_remove_a_tag.3F here] about tags that I would like to direct you to. In short, can moderators be given the power to delete them? As well, can the tag "tie-in fiction" be introduced to replace the overly-broad "novelization" for works that are not novelizations in the traditional sense (novel adaptations of screenplays or similar works)? [[User:Shuulinific-Lul|Shuulinific-Lul]] 15:30, 12 March 2012 (UTC)
 
 
 
== Interface - notes ==
 
 
 
I added notes to your verified {{P|18336|Interface}}. [[User:AndonSage|AndonSage]] 02:30, 23 March 2012 (UTC)
 

Latest revision as of 22:51, 7 October 2023

MediaWiki

Hi. I am responsible for a MediaWiki-based wiki for work, and in early 2020 I did a major upgrade from 1.16 to 1.34, which included having to upgrade MySQL, PHP, and a bunch of extensions. My environment is Windows, but from a MediaWiki point of view, I don't think underlying OS makes much difference. I realize ISFDB's MediaWiki is even older than what I started with, but if I can help, answer questions, or experiment, let me know. I'm happy to try to lend a hand. --MartyD 08:46, 1 January 2021 (EST)

So I might as well start with a current accounting of everything. My notes (from May 2014) from a previous attempt to move to MediaWiki 1.22 (that I never finished) showed that we needed to do the following:
  • Move to SQL 5.0.2 or later. We were on 5.0.45 at that time (and we still are)
  • Move to PHP 5.3.2 or later. We were on 5.2.4 at that time (and we still are)

I have the following packages/add-ons laying around in my home directory at the ISFDB:

  • mediawiki-1.12.0rc1.tar (original Mediawiki version)
  • ImageMagick-6.4.1-8.i386.rpm
  • highlight-2.6.10
  • geshi-1.0.7.21.tar
  • SyntaxHighlight_GeSHi.class.php
  • SyntaxHighlight_GeSHi.i18n.php
  • SyntaxHighlight_GeSHi.php

The following extensions are installed in wiki/extensions:

  • ConfirmEdit
  • SyntaxHighlight_GeSHi
  • SVGtag.php

Moving PHP is easy, because nothing else on our system relies on it. Looks like MySQL 5.5.8 is required for the latest version of MediaWiki. I'm running 8.0.22 on my fresh install at home, and I am seeing errors on all pages with incorrect date values. I'm not exactly done with my installs, so some of these might be artifacts of some other issues, but there are some notes/queries elsewhere in our wiki about date format issues while using later versions of MySQL.

If a MySQL move is required to get to the new MediaWiki, then obviously we need to move the ISFDB along as well. So that seems like the first step to me. Alvonruff 14:15, 1 January 2021 (EST)

I have been running MySQL 5.5.17 on my development server for the last 6 years or so. I have encountered only one problem so far. A particularly tricky SQL query ran fine under 5.5.17, but it hung on the production server. I had to break up the query into two separate queries for it to work. Based on my experience with it, we should be able to upgrade the production version to 5.5.17 without running into any issues. Ahasuerus 17:03, 1 January 2021 (EST)
I'm running MySQL 5.7.29 with MediaWiki 1.34 and PHP 7.4.4 at the moment. (I have not done the 1.34 -> 1.35 update yet). I did not have any MySQL problems but did have some PHP-related issues where behaviors, packages/functions, and defaults have changed. And then MediaWiki itself needs different syntax and different packages/settings in LocalSettings.php. I recall having to do the upgrade in multiple steps (I thought I had to do something like get to 1.27 first, then from there go to 1.34), but the UPGRADE information seems to suggest being able to convert directly from 1.1x to 1.35. If you'd like, I can get my environment up to snuff for 1.35 and then try upgrading a recent dump and see what happens. DB upgrade will probably take hours. I could also see what's up with those three extensions. --MartyD 08:02, 2 January 2021 (EST)
That would be awesome, given you've already done this before. Do you need a current listing of LocalSettings.php ? Alvonruff 16:40, 2 January 2021 (EST)
I'm happy to help with the extensions and LocalSettings.php, as I have experience with those where I work (I maintain several different wikis, and have updated them multiple times now). I'd need to have admin access via command line, though, as that's how I know how to do things. :) ···日本穣 · 投稿 · Talk to Nihonjoe 12:23, 4 January 2021 (EST)
@Al: Yes, if you could send me the LocalSettings.php, that would be great. You can XXXX out the database credentials -- I will use my own -- and I don't think there is anything else sensitive in there. You might need to zip it or rename it to ".txt" to get it through any mail filtering. --MartyD 14:38, 6 January 2021 (EST)

Ongoing work on HTTPS-Support of ISFDB

I'm currently in contact with Ahasuerus who is working on conversion ISFDB the python code to configure/enable HTTPS (#1298 Support HTTPS). Which is somewhat a bigger task, I thought at the beginning, doing it right.

I'm currently running my own HTTPS-implementation of HTTPS on a local server, using newest MariaDB, MediaWiki 1.36, Apache 2.4. Upgrading ISFDB to a similar setting requires OS-Updates, including MySQL and other upgrades (as mentioned above).

I won't go into detail here, but [[User_talk:Ahasuerus|Ahasuerus] asked to jump into the current discussion. There is currently a need for the system administrator, who is responsible for the server (upgrading...) --elsbernd 06:25, 28 November 2021 (EST)

I have moved the discussion from my Talk page to Development/HTTPS. I plan to add a list of identified dependencies next. Ahasuerus 16:28, 28 November 2021 (EST)
I have created a list of dependencies and sent Al an e-mail. Ahasuerus 18:15, 28 November 2021 (EST)

2022-03-05 performance issues -- a DDOS attack?

Our current performance issues may be due to a DDOS attack -- see these findings for details. Would you happen to have any ideas? Ahasuerus 13:16, 5 March 2022 (EST)

SQLloadNextSubmission error

I am trying to recreate the SQLloadNextSubmission error that you ran into on my development server. A couple of questions to make sure that we are on the same page:

Ahasuerus 16:16, 5 March 2022 (EST)

Yes to both. I do only have exactly 1 user on the system. The observed error is:
   Traceback (most recent call last):
     File "/usr/lib/cgi-bin/mod/submission_review.cgi", line 44, in <module>
       ApproveOrReject('%s.cgi' % submission_filer, submission_id)
     File "/usr/lib/cgi-bin/mod/common.py", line 110, in ApproveOrReject
       PrintSubmissionLinks(submission_id, reviewer_id)
     File "/usr/lib/cgi-bin/mod/common.py", line 127, in PrintSubmissionLinks
       next_sub = SQLloadNextSubmission(submission_id, reviewer_id)
     File "/usr/lib/cgi-bin/mod/SQLparsing.py", line 2139, in SQLloadNextSubmission
       db.query(query)
   ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'groups\n
I changed PrintSubmissionLinks to:
       try:
               next_sub = SQLloadNextSubmission(submission_id, reviewer_id)
       except:
               next_sub = 0
But there is another failure case when SQLloadNextSubmission actually succeeds, and there is a next_sub, but I need to figure out the steps to get there. —The preceding unsigned comment was added by Alvonruff (talkcontribs) .
According to the error message above, it's a syntax error in the following SQL query:
       query = """select * from submissions s
               where s.sub_state = 'N'
               and s.sub_holdid = 0
               and s.sub_id > %d
               and not exists (
                       select 1 from mw_user u, mw_user_groups groups
                       where s.sub_submitter != %d
                       and s.sub_submitter = u.user_id
                       and u.user_id = groups.ug_user
                       and groups.ug_group = 'sysop'
                       )
               order by s.sub_reviewed
               limit 1""" % (int(sub_id), int(reviewer_id))
Would it be possible to use Python's "print" statements to display the values of "sub_id" and "reviewer_id" before the query is executed?
submission_id = 5243522 (same as the argument to the cgi script), reviewer_id = 2
Also, when you say that you have only 1 user in the database, do you mean that you are not using the publicly available backups? Or did you truncate mw_user after installing them? Ahasuerus 18:28, 5 March 2022 (EST)
No, the mw_user table has 1,977,439 entries in it. The mw_user_groups table, which control the editing permissions was empty in the backup, so it now has two entries for me. Since I was already present in mw_user, I modified the create_user.py script to not insert me again into that table, and let it do all the password stuff, and then add the two entries into mw_user_groups (sysop and bureaucrat).
What MySQL version are you using? "GROUPS" is a reserved word as of 8.0.2 per https://dev.mysql.com/doc/refman/8.0/en/keywords.html#keywords-8-0-detailed-G ErsatzCulture 19:24, 5 March 2022 (EST)
That will do it, thanks! Let me change it to something else... Ahasuerus 19:51, 5 March 2022 (EST)
Done, although the list of recently added MySQL reserved words is so long that I wouldn't be surprised if we ran into something else during testing. Ahasuerus 20:20, 5 March 2022 (EST)

Python 2.7

I am not sure how much it may help with Linux, but here is what I have been running on my Windows 10 development server for the last few days:

I am in the process of testing every Web page and every ISFDB process on my development server. Hopefully everything will check out. The current Python code does a number of funky things like occasionally redefining "id" and "type" and it's possible that Python 2.7 may be less tolerant of that level of abuse. We should find out soon enough. Ahasuerus 18:46, 6 April 2022 (EDT)

Python2.7 does seem to be the likely culprit (more so than MySQL itself). I'll be installing 2.5, and that will tell me where the problem lies. Alvonruff 06:04, 7 April 2022 (EDT)
I'm curious why Python 2.7 is being used for the upgraded site. Wouldn't it be better to switch to a newer version, like 3.8, or even 3.10, especially since 2.7 reached EOL in 2020? ···日本穣 · 投稿 · Talk to Nihonjoe 13:07, 9 May 2022 (EDT)
Unfortunately, Python 3.x, unlike Python 2.7.x, is not backward compatible with Python 2.5.x. Ahasuerus 13:30, 9 May 2022 (EDT)
That's true, but since so much of the site is being rewritten and redone, wouldn't it be better for the future to redo any Python used on the site to use Python 3.x? ···日本穣 · 投稿 · Talk to Nihonjoe 13:35, 9 May 2022 (EDT)
I am sure we would all like to move to Python3, however, that would entail many changes (which could be done and probably should be however these are fraught with issues and thus will take significant time to untangle). For example, the website is serving pages in Latin1 (not UTF-8) and I believe the database is storing strings that way too. We get Unicode support by allowing HTML entity coding in said strings. It is quite ugly but it works. Strings in Python2 are basically binary strings (although in late versions there is also a "unicode" string type). In Python3 all strings are Unicode (though not UTF-8; there is a PEP for the encoding someplace) but there is also a "bytes" type which is basically a binary string (as well as a mutable "bytearray" type). We would likely want to update the database to use UTF-8 strings and get the website to serve UTF-8 and get rid of all the HTML entity encodings for for non-Latin1 content but updating all the Python, JavaScript and SQL code to handle such is a nontrivial undertaking. Could we move to Python3 keeping our currently encoding mess? Maybe but I am not sure it is worthwhile. —Uzume (talk) 01:54, 7 September 2022 (EDT)
There are three pretty big issues moving to Python 3:
  • The primary function of the isfdb is to gather information from MySQL, and then organize, format, and print that data. Since the fundamental data type for strings is different in Python 3, and the methods for printing are different (including the syntax of those methods), all of the formatting/output code of the isfdb code would require rewrites - and that's the vast majority of the isfdb. There are some automated tools to help in such a conversion, but I haven't tried those as yet.
  • The current connector between MySQL and the ISFDB only works on Python 2.X. Moving to Python 3 requires moving to a new connector (most likely the connector produced by MySQL). That connector uses a different paradigm for the storage of queries, so all of SQLparsing.py would require a rewrite. I have done experiments with Python 3 and the new connector, and have written up how to convert our current SQL design patterns into the new connector requirements, but our SQL code isn't isolated to just SQLparsing.py (we have a ton of support scripts that would also need conversion).
  • As Uzume discussed above, the character set problem is probably the biggest issue of all, and was the single biggest issue in the modernization project this year (see User:Alvonruff/The Charset Problem). Since python and the connector both have charset changes, we would almost certainly attempt to simplify the charset problem by moving to the unicode standard (which we absolutely should do at some point), which would require converting all of the data resident in MySQL (as in we would need to write conversion tools to pull every line of data out of MySQL, convert it from the current mish-mash of Latin1+Other Stuff into unicode), and then write it back into MySQL. This part of the project comes with a super-crazy amount of risk.
On a scale of 1 to 10, I would put the difficulty of this year's modernization project at a 2 or 3, and we started that at the beginning of the year, and still haven't quite completed that project. That said most of the changes we did for the modernization project were configuration changes, and a smattering of single-line code additions, not a rewrite. I estimate the difficulty of a python 3 conversion to be more like a 7 or 8, and may take more than a year to complete. I've done some experimentation for a python 3 move, and will likely use the isfdb2 staging server for that project next year. But we were out of time due to the hosting change, which put python 3 out of scope for this year.
It's really on the Python team for breaking compatibility between 2.X and 3.X. I'm sure there were fabulous reasons for doing so, but the barrier to entry for 3.X is causing widespread delays in its adoption. For instance, in the 3D printer community, the most modern firmware available is Klipper, which is still on Python 2.X, as moving to 3.X is a massive undertaking. Most teams are making decisions on whether they want to burn their limited volunteer time on doing new features, or on trying to move to the latest version of Python. In my mind, there have been two major versions of the ISFDB: the first was the non-database version written in C, with the indices compiled for online use, and the second was the move to python/MySQL. Moving to python 3 is such a large project, that I consider that to be the next major phase of the ISFDB, as it would be mostly a rewrite of everything. Alvonruff (talk) 07:10, 7 September 2022 (EDT)
We are far from the only ones so affected (e.g., Ren'Py used to use pygame mostly for its SDL binding but they needed to move from SDL1 to SDL2; pygame moved but also moved to Python3 so Ren'Py created its own SDL2 binding for Python2 until it can be migrated, however, migrating to Python3 is complex since Python2 is exposed to users of Ren'Py necessitating a major breaking change). That said, this has been coming for a very long time and we could have been more proactive to not let ourselves get put into the position we are not in, e.g., Python has had a Unicode string type since 2.0 (introduced with PEP 100; 2.0 was released 2000-10-16). Regardless, we are here now and it is a major issue that will take significant work to fix. As Al said, we will likely have to do a major database conversion (effectively making a new Unicode database based upon the current pseudo-Unicode one). That will necessitate significant changes to the codebase. I might make more sense to consider rewriting the code. For example, make a script to convert the database and then a Python3 access code and keep the current Python2 for database changes until we can get a new submission and moderator interfaces developed, etc. (i.e., the new Python3 would likely start as just a database viewer and the database would have to get say period updates converted from the current one, etc. until a full switch over could be made.). —Uzume (talk) 15:00, 12 September 2022 (EDT)
Moving from HTML-encoded characters to UTF-8 is clearly beneficial because it will allow proper searching and other functional improvements. However, it can be done under Python 2.7. What are the benefits of moving to Python 3? Ahasuerus (talk) 18:05, 12 September 2022 (EDT)
All of my own Python code for the past 5+ (?) years has been Python 3. However, there's very little that I use that isn't available in 2.7. From the discourse I see on Twitter, the main things of note that have been added in recent years are type hints, async and pattern matching (basically like a more powerful switch statement AIUI). None of these things are particularly interesting to me - I'm sure they have their uses, but I don't see any major wins for the stuff I personally do.
AFAIK (and I don't pay much attention to this) all distros still ship with both Python 2 and 3, none has moved to just Python 3. (And generally people use virtualenvs, Docker etc for their own preferred version/libs/etc.) In the context of ISFDB moving to Python 3, I think any benefits would be (a) not getting caught out if there are security issues discovered in Python 2; (b) longer term, new Python devs are likely to start on Python 3, so might struggle with Python 2 codebases; (c) picking up any new tooling/enhancements/whatever that almost certainly won't be available for Python 2. None of these strike me as convincing arguments to justify the work necessary for a 2->3 migration, at least at this moment in time.
IMHO there are plenty of other areas that might deserve attention over a 2->3 migration, but that's a different discussion... (Which is why I'd kept out of this talk item prior to this time) ErsatzCulture (talk) 18:29, 12 September 2022 (EDT)
My concerns with staying on Python2.7 are: 1) There are issues with the Python2 unicode model, and those issues were a driving factor in the creation of Python3 (see: https://python-notes.curiousefficiency.org/en/latest/python3/questions_and_answers.html). If we undertake a large charset project, we will encounter those issues. 2) The unicode support in MySQLdb is sketchy, and the newer connectors don't work with Python2. 3) Staying with Python2 leaves us marooned on MySQLdb, which was abandoned a decade ago. If we stay on Python2, then we'll either have to take ownership of MySQLdb to fix the unicode issues we encounter, or we'll need to fork mysql.connector to support Python2 (which may not be possible).
That said, I don't think we yet have a concrete (and reasonable) proposal for how to proceed. It can't be: we rewrite everything, including all data in the database - as we'll be debugging that for years, as we don't have a formalized, automated test system. I suspect the MySQL conversion and the MySQLdb/Python3 work can be done separately, but it's currently unknown how well one would work without the other, or how that work would be verified. --Alvonruff (talk) 07:52, 13 September 2022 (EDT)
What do other Python 2.7-based projects do when they need to store Unicode data in a database? Do they use MySQLdb in spite of its "sketchy Unicode support"? Ahasuerus (talk) 10:40, 13 September 2022 (EDT)
P.S. I see that there are ways to write Python code that should work under both Python 2.7 and Python 3.4+ -- see this page. Some parts require importing from "future" and related "futurization" modules, but it looks doable. If true, it should be possible to update our code to be Python 3-compatible while we are still on Python 2.7. It wouldn't immediately address some parts of the Python 2 libraries that have been deprecated in later versions of Python 3, e.g. cgi, but it's a start. Ahasuerus (talk) 08:07, 14 September 2022 (EDT)
This is a pretty attractive approach, which would create the following substeps to Python3:
* Use 2to3 (https://docs.python.org/3/library/2to3.html) to do a quick side conversion of files from python2 to python3. We would not directly use these files, but would instead use them to diff the delta between python2.7 and python3 to create a roadmap of changes we would need to implement via futurization.
* Do a futurization of the files, ultimately minimizing the list of outliers to those that cannot be addressed with this methodology. This can be done file by file to minimize overall risk.
* Do a full conversion to python3 and move to mysql.connector, but do not modify the database. It's a TBD to determine if this step is feasible, but tests show we can use python3 and mysql.connector and extract the same strings from the database that we currently see in python2.7. It's a question of whether they can be formatted for output by python3 to a browser correctly (which I don't know the answer as yet).
* Technically, the python3 conversion would be done at that point, leaving unicode as a different next big project. --Alvonruff (talk) 08:33, 14 September 2022 (EDT)

(unindent) I just did a quick run of both 2to3 (which does an automated attempt at porting python2.7 to python 3) and futurize on all files in our common directory (22 files). futurize was probably built on top of 2to3, as they take exactly the same arguments. Diffing the output of the two files generates a pretty small diff, mostly around the handling of iterators, which requires the futurized version to import object from builtins, which is then fed into every class method. Observations:

  • The output from 2to3 fails to execute under python3 due to "inconsistent use of tabs and spaces in indentation", so we'll need to post-process the files to meet the isfdb indentation standard (using something like PyCharm). The output from futurize seems to run fine under Python2.7. So an additional step for moving to Python3 is to fix the indentation issues.
  • new imports from futurize that would need to be removed to run under python3 were:
    • from builtins import chr
    • from builtins import map
    • from builtins import object
    • from builtins import range
    • from builtins import str
    • from __future__ import print_function
    • from future import standard_library
  • We would need to remove all object references before a final move to Python3.

This seems pretty promising. We still have a need to run the current code base on isfdb2.org for now, so I'll explore the possibilities of having both futurized and non-futurized versions running at the same time (with different paths).

I futurized everything in biblio and common, and have it online at: https://www.isfdb2.org/cgi-bin/p3/index.cgi. Observations:
—The preceding unsigned comment was added by Alvonruff (talkcontribs) .
I agree that it's an attractive approach. Some of the changes outlined above, e.g. spaces vs. tabs, are just cleanup which will be beneficial even if we don't move to Python 3 in the foreseeable future.
It's also good that we identified the issue with non-Latin-1 characters early in the process. If it turns out to be a show-stoppers, we'll know about it sooner rather than later. Ahasuerus (talk) 20:21, 14 September 2022 (EDT)
I agree. In everything I have read python-future is a bit dated but perhaps the best and most up-to-date method to create a Python2 and Python3 compatible code base and its futurize is a good method for doing a brute force conversion (which should always have manual oversight as it is not perfect) from Python2 to Python3. Since we are discussing major Python code changes, I wanted to bring up the code structure too. Currently we host this cold with a large number of assorted CGI scripts. I am not suggesting we totally abandon CGI hosting but currently this is particularly messy and forces people to continue hosting it such. I have proposed in the past moving all the code to WSGI and hosting under a single CGI interface allowing it to also be hosted in other ways (e.g., FastCGI, etc.). A single entry point means having to part CGI PATH_INFO to obtain path information past the script component but this is very commons in most server-side web apps today. Perhaps the bigger issue in moving to such is the permanence of inbound URLs, where we might want to setup some redirection or the like (but many do not need to be sustained like /edit/ and /mod/, etc.). On the up side this would also mean the installation would be simpler as the code could be installed completely as Python libraries with only the single CGI endpoint (and any redirecting compatible endpoints) needing to be installed in CGI space (so in most situations we could be rid of #!_PYTHONLOC). —Uzume (talk) 17:15, 17 September 2022 (EDT)
One thing to note is that most CGI-specific processing -- paths, script names, query values, validation, unescaping, etc -- has been moved to one central location over the last year. One temperamental part of CGI that hasn't been centralized yet is cgi.FieldStorage. And then there is the fact that the cgi module was deprecated in Python 3.11. Ahasuerus (talk) 17:56, 17 September 2022 (EDT)

CC license: 2.0 vs. 4.0

Earlier today User:Nihonjoe mentioned that Creative Commons 4.0 is the latest -- and almost identical -- version of CC 2.0, which we currently use. I know little about licenses, but it seems to be a correct assessment. Would you happen to be aware of any reasons why we shouldn't upgrade to 4.0? Ahasuerus 20:17, 18 April 2022 (EDT)

I have no issue with Attribution 4.0 International (CC BY 4.0). Alvonruff 06:37, 19 April 2022 (EDT)
Thanks! Ahasuerus 10:42, 19 April 2022 (EDT)

Searching

I don't know whose lap this would fall into (I will point Ahasuerus to this), but with regard to this Wiki search behavior, I think that may mean that maintenance/rebuildtextindex.php ought to be (re)run. IIRC, the normal background search index rebuilding only works off of the recent changes list. The move might have had some other oddball effect on the existing index that is causing it to not align correctly somehow. --MartyD (talk) 14:39, 14 September 2022 (EDT)

I'll leave it in Al's capable hands :-) Ahasuerus (talk) 15:07, 14 September 2022 (EDT)
Well before I embark on an update that "may take several hours" (according to the docs), I guess I'd like to know exactly what issue we're trying to solve, and how we know it the update had any effect. I'm not seeing any search issues, and I'm not using quotes. For example, if I search for the words normal background search (without quotes) from MartyD's post above, I see this page in the results. So is there a test search that fails, that we know should not fail? --Alvonruff (talk) 16:21, 14 September 2022 (EDT)
So just to be clear on what I'm seeing, let's take the Lord of the Rings example cited above:
  • If I type the words Lord of the Rings into the search bar, without quotes, I see a single hit for the page "Rules and standards discussion", which does not actually contain the phrase "Lord of the Rings".
  • If I then click on "Everything" (just below the search bar), I then see 5 hits, the two most important being "User talk:Animebill" and "User talk:Mavmaramis", both of which do contain the phrase "Lord of the Rings".
  • If I click on "Advanced" it reveals why this is the case. The default search namespace is "(Main)" and none of the other namespaces are checked, so searches will not look on the "User talk" namespace pages, which is why the phrase on both the "User talk:Animebill" and "User talk:Mavmaramis" pages fail to show up as hits.
  • If I select the "User talk" namespace, and then click on "Remember selection for future searches", and then search again, I see 4 hits. It doesn't display all 5 hits, because the fifth hit is "ISFDB:Moderator noticeboard", where the issue was reported, and that page is in the "ISFDB" namespace - which I did not enable.
  • If I go to "Advanced" and click the "All" button on the right (under "Check") as well as the box for "Remember selection for future searches", then a search shows all five hits. --Alvonruff (talk) 17:34, 14 September 2022 (EDT)
  • P.S. It now shows 6 hits, since I said the words on this page :) --Alvonruff (talk) 17:38, 14 September 2022 (EDT)
If I type "lord of the rings" with no quotes into the top search box, I get 6 hits, none showing "lord of the rings". The search results page shows context for me is Advanced, with Main + User + User talk + ISFDB + ISFDB talk + File + Help + Help talk + Magazine. Re-pushing the Search button there produces the same results. If I type "lord of the ring" with quotes, in either location, and all other things the same, it produces 5 hits, all of which show that phrase. I do notice the five pages found are a subset of the 6 pages found in the original hit, so perhaps what's displayed is just an artifact of how the snippet is selected; I did not notice that before. BUT.... Taking the original complaint that there should be many hits at face value, I also notice that all of the hits are on recently modified pages, and none is on a page not recently modified. Which makes me think (Male Answer Syndrome, I admit) that the background index rebuild is working on the recently changed pages, and so searching is finding those, but older pages need to be re-indexed. --MartyD (talk) 12:46, 16 September 2022 (EDT)
I think that Marty is right - the problem is not new pages - these get indexed just fine. The problem are old pages after the DB change. One page I always look for via search is Entering non-genre periodicals. The current search cannot find it in any way or form (it does find a few pages where it was referenced and which had been updated lately but not the main page). I just went via google search to pull it up but I suspect that the lack of an index may have made all our help pages not findable and this is not optimal... Annie (talk) 13:44, 16 September 2022 (EDT)
Ok. maintenance/rebuildtextindex.php has completed. Let's see if it rectifies the situation. --Alvonruff (talk) 14:51, 16 September 2022 (EDT)
Search for "Entering non-genre periodicals" (with or without quotes) shows the Help page (and its Talk page) now, including populating the "Page title matches" area which was empty before so we seem to be back to normal. A few random other help pages also pop up as soon as you look for them (which was not happening earlier). "lord of the rings" with no quotes pulls 174 results now. Marty will probably want to recheck but I think we are all sorted now. Thanks! Annie (talk) 15:00, 16 September 2022 (EDT)
That did it! Now "lord of the rings" finds 164 hits without quotes and 147 hits with quotes, many pages last edited years ago. Thanks! --MartyD (talk) 17:06, 16 September 2022 (EDT)

Adding Mediawiki extension TemplateStyles

Will you install the TemplateStyles extension? It will allow for individual templates to have specified mini stylesheets. Thanks! ···日本穣 · 投稿 · Talk to Nihonjoe 15:24, 27 December 2022 (EST)

Including the TemplateStyles extension causes a fatal wiki error across all pages. I'll need to debug on the other server. Alvonruff (talk) 08:48, 28 December 2022 (EST)
What's the specific error? I've had good luck using the Support desk over on the Mediawiki site. ···日本穣 · 投稿 · Talk to Nihonjoe 12:20, 28 December 2022 (EST)

Saturn's Children

https://www.isfdb.org/cgi-bin/pl.cgi?279672; https://archive.org/details/isbn_9780739499344; Archive.org copy uploaded way back in 2012, info fits your PV but the wrong cover (with the right artist) is shown on the ISFDB page, somebody named Aardvark or something like that entered the same edition recently but left out/botched some stuff and didn't PV, so if you want to add the Archive link to yours, replace the cover, and then maybe ask Mr. Aardvark if they think theirs is still needed or could be deleted. --Username (talk) 09:57, 30 December 2022 (EST)

This is a book I had at the time, but was sent away during one of the many book purges, so I can't go to the source any longer. That said, the image is correct, and is consistent with the other Ace editions, which list the artist as Joe Williamsen. So I suspect it requires an artist change, not an image change. Alvonruff (talk) 20:52, 30 December 2022 (EST)

Taff

https://www.isfdb.org/cgi-bin/ea.cgi?15027; Re: your recent entry of contents for Orphans of Bliss, either Taff's name has the periods or it doesn't, in which case a variant would need creating. --Username (talk) 19:08, 2 March 2023 (EST)

Python3 and Unicode thoughts

A couple of thoughts about User:Alvonruff#Python3_Notes, specifically "2. Update all character sets":

  • A number of Python modules currently reference "iso-8859-1" explicitly. In some cases it's apparently redundant and can be removed at any time, but a few modules like common/isfdb.py will need a manual review.
  • The software uses a number of HTML-encoded Unicode strings for certain UI elements and currency signs. They were recently consolidated in "class _Ui" and "class _Currency" in common/isfdb.py. There are a few other functions and classes that also use HTML-encoded Unicode string, e.g. "def ISFDBUnicodeTranslation" in common/library.py and a bunch of functions in the cleanup reports directory. Some can be consolidated ahead of time.

Also, my next big project is migrating Fixer to Python/MySQL and re-hosting it on a server accessible to moderators (which may or may not be the live ISFDB server depending on the likely impact on performance.) I have already migrated the Amazon API and some other supporting modules, but most of the heavy lifting still needs to be done. I should presumably go back and make sure that the previously migrated modules work under Python 3. None of them use MySQL, so they can't be a test case for the MySQL conversion. Ahasuerus (talk) 12:35, 27 April 2023 (EDT)

I haven't thought strongly about the character set problem as yet. I just happened to notice a number of display errors when I had index.cgi, ea.cgi, and pl.cgi all running under python3.
I think we can discuss hosting fixer on isfdb2, especially since all the login/moderator data is already there. It's just not stable right now, with python3 experiments, but there's no reason it couldn't have its own set of unaffected web pages.
I'm currently converting existing files for print(), MySQL, and tabs, and ensuring that they still run on python2. If you want access to the new SQLparsing.py let me know, and I'll drop a copy someplace on isfdb2. It runs fine under python3 (after installing mysql.connector, and making a 1-line change to the file) Alvonruff (talk) 15:21, 27 April 2023 (EDT)
Chances are that I won't be able to start working on migrating Fixer's data to MySQL until some time in June at the earliest, so there is no rush. I need to fix Bug 491 first and then I need to merge Fixer's "978 ISBNs" data store with the "B0 ASINs" data store. Designing a new workflow for Fixer won't start until after I am done with that.
As an aside, making Fixer's data available to moderators will change a lot of things since it will mean going from a single user (me) to multiple concurrent users. For starters, the Amazon API can only handle so many multi-ASIN requests per minute, so we will need a single-threaded background process with a built-in throttle mechanism.
Also, the current Fixer design is based on the idea that an ISBN/ASIN can be assigned to one (and only one) "queue". Fixer's other tables and algorithms -- high/low priority publishers, high/low priority authors, etc -- support this design. When multiple moderators start working on Fixer's data, they will concentrate on different areas as we have seen happen in the past. Using multiple servers (since creating lists of new ISBNs/ASINs will be done on a third server) will add more wrinkles. Etc.
Not all of this functionality needs to be implemented right off the bat, but we will want to make sure that the new design doesn't paint us into a corner. Ahasuerus (talk) 16:34, 27 April 2023 (EDT)

mysql.connector

A couple of questions/thoughts re: User:Alvonruff/mysql.connector:

  • mysql.connector 8.0.24 doesn't play nice with Python 2.7, but versions 8.0.23 and lower do, at least according to MySLQ.com. I wonder if 8.0.23 may be worth a try since it would presumably let us upgrade the ISFDB software in small increments while remaining on Python 2.7.
  • The MySQLConnection.sql_mode Property section of the "MySQL Connector/Python Developer Guide" has a list of connector properties that can be set. The list includes 'NO_ZERO_IN_DATE' and 'NO_ZERO_DATE', which is what MySQL uses to support "00" month/day values and "0000-00-00" values respectively. Have you tried experimenting with them?

Ahasuerus (talk) 16:16, 30 April 2023 (EDT)

I experimented with the Python3 datetime class (not related to MySQL at all), and it no longer supports the concept of a month=0 or day=0, and throws an exception. Suggestions on the Internet are to use year-01-01, which doesn't work for us. So I currently believe we need to extract the dates as a string (possibly into a custom datetime class). Nonetheless, it feels like something is being missed, as this is a pretty big fundamental issue. There are ways of creating a custom converter for the connector, which I'm also looking at.
Using 8.0.23 may be interesting. It may also pull is into the charset issues (which I haven't started looking at yet). Alvonruff (talk) 06:19, 1 May 2023 (EDT)
Okay, I am onto a different trail. If you initiate the connector with raw=True, you get back a bytearray for each field, so fields of type DATE are returned, since you are bypassing the converter in the connector. You then cast with str() using the target charset (I am oversimplifying, as you need to worry about NULL and integer fields). I have something hobbling, but need to unwind the other changes. Alvonruff (talk) 22:25, 1 May 2023 (EDT)
What will the "raw mode" do to time, float and enum values? Also, if I understand the idea correctly, titles like "1984", authors like 171 and series names like "1999" will be converted to int, right? Ahasuerus (talk) 23:08, 2 May 2023 (EDT)
[Edit:] Another thought. As you said in your notes, ideally we would address this issue at the query level. Something like "SELECT CAST(title_copyright AS CHAR)" or "DATE_FORMAT(title_copyright, '%Y-%m-%d')" instead of "SELECT title_copyright". The most time-consuming problem with this approach is that we have a lot of "SELECT *" queries, where "*" would need to be changed to a full list of fields for this approach to work.
One possible workaround would be to create globally scoped variables or attributes (in common/isfdb.py) with lists of field names for each ISFDB table. Date field names would be defined to include "CAST" or "DATE_FORMAT". Once that's done, we should be able to modify all queries (mostly in common/SQLParsing.py) which start with "select * from table_name" to use "select %s from table_name" % LIST_OF_FIELD_NAMES_FOR_THIS_TABLE instead. Ahasuerus (talk) 23:36, 2 May 2023 (EDT)
[Edit #2] Another advantage of this workaround would be the ability to update all queries to use the newly defined globally scoped variables/attributes ahead of time, before migrating to the new connector. The connector migration patch would only need to change the lists of table-specific field names in common.isfdb.py to include "CAST" or "DATE_FORMAT" for date fields. Ahasuerus (talk) 07:39, 3 May 2023 (EDT)
The problem with both CAST and DATE_FORMAT is that they only work well if you are selecting just the date field. IF you issue the following SQL command:
   select *, cast(title_copyright as char) from titles where title_id=10604;
MySQL returns:
  +----------+-------- [...]
   | title_id | title_title                    | title_translator | title_synopsis | note_id | series_id | title_seriesnum | title_copyright | title_storylen | title_ttype | title_wikipedia | title_views | title_parent | title_rating | title_annualviews | title_ctl | title_language | title_seriesnum_2 | title_non_genre | title_graphic | title_nvz | title_jvn | title_content | cast(title_copyright as char) |
   +----------+------- [...]
   |    10604 | Doctor Who and the Giant Robot | NULL             |           NULL |  151121 |      5277 |              28 | 1975-03-13      | NULL           | NOVEL       | NULL            |        1316 |            0 |         NULL |              1223 |         0 |             17 | NULL              | No              | No            | Yes       | Yes       | NULL          | 1975-03-13                    |
   +----------+------- [...]
The date field is not modified in place, the string version is appended to the end of the record. DATE_FORMAT does the same. So there must be some fixup code as well, that takes the appended field at (titles[len(record)-1]) and copies it into the original field at (titles[TITLE_YEAR]), which will be a datetime from Python's perspective. This was the first strategy that I took, but examining each query to figure out where the FORMAT statement goes, as well as the placement of the fixup code was taking a considerable amount of time, and there are roughly 1400 unique query statements to go modify. So I was looking for something a little less invasive and error prone, which was raw mode.
The attribute field idea is interesting, however the fetch_row/fetchmany routines don't have any idea what record type they are reading - they just extract the next blob of available data. And not all queries extract whole records. For instance:
   query = "select metadata_counter from metadata"
So we would need to store a custom conversion mapping before making the query call. For instance:
   CNX.FORMAT("INT")
   query = "select metadata_counter from metadata"
   CNX.QUERY(query)
Or the more complicated:
   CNX.FORMAT("INT, STR, STR, INT, INT, INT, INT, CHAR, CHAR, INT, CHAR, INT, INT, FLOAT, INT, INT, INT, CHAR, INT, INT, INT, INT, CHAR")
   query = "select * from titles where title_id=10604;
   CNX.QUERY(query)
That can certainly be done, and it would be preferable to the current brute force method, but it is encroaching on custom converter territory. At least a custom converter has direct access to the MySQL field types, so we wouldn't have to specify them. I will look into that for round #3 on the problem. Alvonruff (talk) 10:00, 3 May 2023 (EDT)
Rereading my last response, I see that I may not have been clear. Let me try to expand a bit. I'll use SQLloadAwards in common/SQLparsing.py as an example. Currently the query statement reads:
   query = "select * from awards where award_id='%d'" % (award_id)
I was considering adding the following globally scoped variable (or property if we put these new values in a class) to common/isfdb.py:
   QUERY_AWARD = "award_id, award_title, award_author, award_year, award_ttype, award_atype, award_level, award_movie, award_type_id, award_cat_id, award_note_id"
We could then change the query statement in SQLloadAwards to:
   query = "select %s from awards where award_id='%d'" % (QUERY_AWARD, award_id)
Functionally, there should be no change to how the function works. Once we are ready to upgrade to the new connector, we will change the value of QUERY_AWARD to:
   QUERY_AWARD = "award_id, award_title, award_author, DATE_FORMAT(award_year, '%Y-%m-%d'), award_ttype, award_atype, award_level, award_movie, award_type_id, award_cat_id, award_note_id"
Similar global variables could be created for "titles", "authors", "pubs" and any other tables that include "date" columns. Switching from the current connector to the new one will then require a simple change to the QUERY_* variables/properties in common/isfdb.py.
Granted, it will only handle "*" queries. The rest will have to be checked and updated manually, but at least they can be found via grep since they are not hidden behind asterisks.
P.S. Another thought. The Python/MySQL converter documentation page mentions two possibly relevant argument names: "converter_class" and "converter_str_fallback". The first is described as "Converter class to use" and the second one as a False/true flag to "Enable the conversion to str of value types not supported by the Connector/Python converter class or by a custom converter class." Apparently the second one was added in 8.0.27, so it requires Python 3, but it could be the solution that we need. Ahasuerus (talk) 16:58, 3 May 2023 (EDT)
OK. Calling out each field works:
   mysql> select award_id, award_title, award_author, DATE_FORMAT(award_year, '%Y-%m-%d'), award_ttype, award_atype, award_level, award_movie, award_type_id, award_cat_id, award_note_id from awards where award_id=1234;
   +----------+---------------------+--------------+-------------------------------------+-------------+-------------+-------------+-------------+---------------+--------------+---------------+
   | award_id | award_title         | award_author | DATE_FORMAT(award_year, '%Y-%m-%d') | award_ttype | award_atype | award_level | award_movie | award_type_id | award_cat_id | award_note_id |
   +----------+---------------------+--------------+-------------------------------------+-------------+-------------+-------------+-------------+---------------+--------------+---------------+
   |     1234 | Another Short Story | Bruce Boston | 2000-00-00                          | Ar          | NULL        | 7           | NULL        |             3 |           21 |          NULL |
   +----------+---------------------+--------------+-------------------------------------+-------------+-------------+-------------+-------------+---------------+--------------+---------------+
I am good with that. Alvonruff (talk) 21:12, 3 May 2023 (EDT)
Update: I have backed out the previous raw mode code, and have a chunk of biblio up and running at isfdb2.org with the new proposal. The only addition is that we need a different set of variable names for when we have multi-table queries, and start using labels like t.* instead of *. Fortunately, most of the queries use the same format, so I have the following definitions so far:
   CNX_AUTHORS_STAR = "author_id, author_canonical, author_legalname, author_birthplace, DATE_FORMAT(author_birthdate, '%Y-%m-%d'), DATE_FORMAT(author_deathdate, '%Y-%m-%d'), note_id, author_wikipedia, author_views, author_imdb, author_marque, author_image, author_annualviews, author_lastname, author_language, author_note"
   CNX_ADOT_AUTHORS_STAR = "a.author_id, a.author_canonical, a.author_legalname, a.author_birthplace, DATE_FORMAT(a.author_birthdate, '%Y-%m-%d'), DATE_FORMAT(a.author_deathdate, '%Y-%m-%d'), a.note_id, a.author_wikipedia, a.author_views, a.author_imdb, a.author_marque, a.author_image, a.author_annualviews, a.author_lastname, a.author_language, a.author_note"
   CNX_TITLES_STAR = "title_id, title_title, title_translator, title_synopsis, note_id, series_id, title_seriesnum, DATE_FORMAT(title_copyright, '%Y-%m-%d'), title_storylen, title_ttype, title_wikipedia, title_views, title_parent, title_rating, title_annualviews, title_ctl, title_language, title_seriesnum_2, title_non_genre, title_graphic, title_nvz, title_jvn, title_content"
   CNX_TDOT_TITLES_STAR = "t.title_id, t.title_title, t.title_translator, t.title_synopsis, t.note_id, t.series_id, t.title_seriesnum, DATE_FORMAT(t.title_copyright, '%Y-%m-%d'), t.title_storylen, t.title_ttype, t.title_wikipedia, t.title_views, t.title_parent, t.title_rating, t.title_annualviews, t.title_ctl, t.title_language, t.title_seriesnum_2, t.title_non_genre, t.title_graphic, t.title_nvz, t.title_jvn, t.title_content"
   CNX_PUBS_STAR = "pub_id, pub_title, pub_tag, DATE_FORMAT(pub_year, '%Y-%m-%d'), publisher_id, pub_pages, pub_ptype, pub_ctype, pub_isbn, pub_frontimage, pub_price, note_id, pub_series_id, pub_series_num, pub_catalog"
   CNX_PDOT_PUBS_STAR = "p.pub_id, p.pub_title, p.pub_tag, DATE_FORMAT(p.pub_year, '%Y-%m-%d'), p.publisher_id, p.pub_pages, p.pub_ptype, p.pub_ctype, p.pub_isbn, p.pub_frontimage, p.pub_price, p.note_id, p.pub_series_id, p.pub_series_num, p.pub_catalog"

Alvonruff (talk) 14:19, 5 May 2023 (EDT)

(unindent) Looks promising! (Also, after sleeping on it I realized that leveraging converter_str_fallback would be a bad idea because it would return some date values as "dates" and some as "strings".)

One related consideration that comes to mind is that I have been moving globally scoped constants to the SESSION object/class and its sub-classes, which are defined in common/isfdb.py. For example, all supported currency signs are currently accessed via SESSION.currency.[currency], all supported publication types are found in SESSION.db.pub_types, all non-trivial UI elements are found in SESSION.ui, etc. It prevents namespace pollution as we add more globally scoped constants.

If we use the same approach for CNX constants, they would be accessed as SESSION.cnx.authors_star, SESSION.cnx.titles_star, etc. Ahasuerus (talk) 17:20, 5 May 2023 (EDT)

Amazon UK vs. Amazon.com

A quick note re: Amazon.com as the source of information about UK publications. I am looking at this submission which you created on 2023-04-10 and which used 2023-05-23 as the publication date. As it turns out, 2023-05-23 comes from Amazon.com while Amazon UK states that the publication date was 2023-02-16. Unfortunately, this happens quite often: some UK publishers make their books available in the US weeks or months after their appearance in the UK and vice versa. It's even worse with Australian books, which commonly appear on Amazon.com and Amazon UK months or even years after they were made available in Australia. And, of course, the Amazon store of the country of publication is much more likely to have the right price value for recent edition, although occasionally Amazon lists an Amazon-specific discounted price without mentioning the list price.

The good news is that things are getting better. Some publishers are meticulous about making their books appear on Amazon.com and Amazon UK at the same time. The bad news is that it's nowhere close to 100% (yet.) The Amazon store of the country of publication is still a much more reliable source than other Amazon stores (publisher sites tend to be even better, but they are not as convenient.) It's also the main reason why Fixer and human editors state the source of their data in the Note field -- it helps determine where our data originally came from if we find discrepancies at a later point.

Hope this makes sense! Ahasuerus (talk) 16:07, 23 May 2023 (EDT)

A few days ago, I went to retroactively add the ebook for this title, and was surprised to see an entry already in the database, even though my tools had highlighted that the ISBN and ASIN were not known. I also noticed the date issue on the physical, but frankly there were several other issues with these that would probably have caused a moderator comment if they'd come from a regular editor:
* (Both pubs): price should ideally be in £ given that the publisher is UK based. I see the hc pub has just been fixed, but the ebook still has this field empty.
* (Ebook): Page count should not be entered for an ebook, unless it's in a paginated format such as PDF
* (Ebook): No cover image, even though the entry was sourced from Amazon post publication, so would 99.9999% certainly have had an image
* (Ebook): No ISBN or ASIN. Whilst these can be a PITA - e.g. no easy way AFAIK to get an ISBN from Amazon, ASINs may differ between different Amazons - they're obviously super useful for any number of reason
* (Ebook): No date on the note to indicate when the data came from Amazon.com. Less of an issue when something is being entered post-publication, but helpful for trying to understand nightmares like this
I'll fix the ebook shortly, but I dunno if there are likely to be any other similar pubs? ErsatzCulture (talk) 16:38, 23 May 2023 (EDT)
Sorry guys. I was restricting myself to award data, but during the entry of the Aurealis 2022 found a lot of missing data, and did wind up putting in a fair amount of Australian titles so I could get the awards in. This particular title was not nominated, so I'm not sure what attracted me to that particular one. That said, the editing tools absolutely would not accept the Amazon image URL for that particular title, and it still has no ISBN or ASIN, so I'll be interested to see how its resolved. The only other publications entered were related to the Aurealis awards. I'm going to be in Python3 land for the foreseeable future, so you don't have to worry about any more entries. Alvonruff (talk) 20:43, 24 May 2023 (EDT)
ErsatzCulture seems to have updated the book itself so now it has its ASIN and ISBN (and I just added the US-side ASIN as well). Not unusual for the Australian records to be missing - Fixer cannot get them until they show up on the US side and most of them don't or show up a lot later. So unless someone makes it a point to track them down, we usually get them when they get nominated or reissued US or UK side.
About the covers - I wonder if you were trying to grab the wrong link from Amazon. In the last year or so, Amazon changed their UI a bit (again) - the main picture in some books (more and more of them) is linked under a very weird address and not necessarily stable address and there is a smaller thumbprint just under the image which actually links cleanly to the proper address that keeps the picture - the main picture is a link to that one. As a rule, if the thumbprints are under the main cover, the main image is usually the weird address these days. Plus it needs to be cleaned from the formatting. If that is not it, if you remember what you were trying, we may be able to see what may have gone wrong.
PS: Glad to see you back around in any capacity. :) Annie (talk) 12:04, 25 May 2023 (EDT)

Banners

I created a banner a couple of years ago for the Japanese SF Magazine, but was told my attempt at writing Data Base in Japanese was wrong. They offered to do better but never got back to me. I have the banner .jpg and constituent elements if you want to take a crack.

I've also collected a few covers for Fleuve Noir, and cut out some elements from a half-dozen or so (.xcf format). It's a back burner project, but yet another attempt at internationalization. ../Doug H (talk) 12:11, 28 May 2023 (EDT)

Fixer, Windows 10 and isfdb2.org

A quick update re: Fixer, Python 3, MySQL, etc.

Microsoft expects to stop security patches for Windows 10 in 2025 and the current version of Fixer requires Windows 10. With all of the recently requested ISFDB features implemented, I plan to concentrate on migrating Fixer to Linux, Python and MySQL as the next big project. I hope to have it done long before the cut-off date, but you never know what you may run into.

Since you are working on upgrading the core ISFDB software to Python 3, I plan to use Python 3 for the Fixer rewrite. Could you please provide a copy of the new, Python 3-compatible, code that you are using on isfdb2.org so that I could use it for reference purpose as I design the new Fixer software and/or reset my isfdb2.or password? I tried to log onto isfdb2.org, but my password doesn't appear to be working any more. TIA! Ahasuerus (talk) 10:05, 2 August 2023 (EDT)

I have recovered my isfdb2.org password; looking at the Python 3 code now :-) Ahasuerus (talk) 17:07, 2 August 2023 (EDT)
I got Python 3 reading data from the core ISFDB tables under Cygwin. Next I'll create a separate MySQL database for Fixer and see how well it performs with Unicode tables. Ahasuerus (talk) 18:31, 2 August 2023 (EDT)
Since you have it working you probably don't need any pointers, but I'm working out of /home/alvonruff/Python3. The build system needs to be primed with a 'make python3' on a new system (which touches a .pythonver file). There's also a relatively recent copy on isfdb.org in /home/avonruff/Python3 (just in case). Alvonruff (talk) 22:04, 2 August 2023 (EDT)
Thanks for the tip! Ahasuerus (talk) 22:14, 2 August 2023 (EDT)
By the way, there is a file in the mod directory call fixup.py. To do a first pass at porting a file you can:
* Turn on the do_tabs variable, and set do_str and do_mysqldb to zero. Then run against the target file. It will produce a file called OUT, with all tabs converted to spaces.
* Run futurize -f print <file>. This will convert all the calls to print. Only.
* Turn off the do_tabs variable, and turn on the others. This will port all the SQL calls (mostly). You'll need to remove all instances of REMOVE_THIS_LINE, and then check if the emitted DB_FETCHMANY's should be DB_FETCHONE's. But otherwise it saves a lot of time. Alvonruff (talk) 22:49, 2 August 2023 (EDT)
Grabbed it, thanks!
So my current (still tentative) plan is to convert Fixer in stages:
  1. Move Fixer's data from "data stores" to MySQL tables. At that point the Fixer software will be talking to MySQL using ODBC.
  2. Rewrite the current version of the Fixer software in Python 3, which will eliminate Windows dependencies and make it possible for other developers to maintain/upgrade Fixer's code if something happens to me. The UI will still be "roll-and-scroll" at that point.
  3. Upgrade Fixer's Amazon interface to support multiple concurrent users, which will require a single-threaded request queue due to Amazon throttling.
  4. Upgrade the UI from "roll-and-scroll" to regular HTML.
  5. Integrate the new HTML interface with the ISFDB code; leverage ISFDB/Wiki account authentication.
  6. Deploy the new Fixer on isfdb2.org and make it available to moderators.
Based on the above, I plan to use the wrapper class (MYSQL_CONNECTOR) that you developed for ISFDB during stages 2-5. The difference is that:
  • I will be using Python 3 from the get-go, and
  • Fixer is already using Unicode
so the connection settings will be a bit different, but it shouldn't be a big deal.
Re: fixup.py and the Python 3 upgrade project, how far along would you say it is? It sounds like the heavy lifting has been done and it's just a matter of testing everything on isfdb2.org, right? Ahasuerus (talk) 08:27, 3 August 2023 (EDT)
The per-script status can be found here. /biblio is complete and tested on both python3 and python2. /edit is complete and tested on python3 and about 75% tested on python2. /mod is about 75% complete. /rest will go rapidly. I haven't cracked open /nightly or /scripts yet. Progress is slow lately, as I've been in physical therapy to regain the full use of my hands, so my typing time is somewhat limited. Nonetheless, after completing the rough port, we can begin checking in changes that do not require python3 (tabs/spaces, print(), the db interface changes), which is why we need to ensure that the changes work on both python2 and python3. After that, the total number of changes are small, so we should be able to integrate, then switch over to python3. We'll have the ability to switch back to python2 if we encounter some issue that requires some time to fix.
That said, I don't plan on checking in the whole mess all at once. But there's nothing stopping us from starting to integrate some of the changes. For instance the, tabs/spaces project can start now (which is a pretty good project itself, given that some of the indentation is very mixed and ambiguous to an automated tool, and it would be good to make that change in isolation). Alvonruff (talk) 07:04, 4 August 2023 (EDT)
Thanks for the update! Sorry to hear about the issues with your hands. On the plus side physical therapy can be very effective these days. Due to all the typing that I do, I have had some issues with my hands and shoulders over the last 10 years, but have been able to recover every time. Knock on wood.
Re: /nightly , most of it is pretty straightforward:
  • There are 330+ cleanup reports, but most of them use "standardReport" to talk to MySQL, so a single change should take care of the vast majority of reports.
  • Report 288 uses slightly different SQL syntax depending on whether you are running MySQL 5.x or MySQL 8.x; we can check the former on my development server, which is running 5.5 on Windows/Cygwin.
  • The "monthly" job, which looks for potential author duplicates, is currently disabled on the live server for performance reasons. The algorithm that I used doesn't scale well: what took hours to do when we had 50,000 authors takes days now that we have 250,000+ authors. There are ways to test it under Python 3, of course, e.g. by deleting all but 10,000 author records, but the algorithm really needs to be replaced before we re-enable the monthly job.
  • The code that runs nightly reconciliation with SFE uses urllib2, so it will need to be tweaked.
  • The code that rebuilds the list of front page pubs uses SQLparsing.py.
  • The code that updates database statistics uses 3 dozen custom SQL queries, which will need to be updated.
Re: "starting to integrate some of the changes" and making the tab/spaces change a separate sub-project, I'll be happy to assist any way I can. Just let me know how you want to structure it. Ahasuerus (talk) 12:08, 4 August 2023 (EDT)

Fixer's Amazon API and Python 3

Fixer's implementation of the Amazon API (built on top of Amazon's reference implementation) has been upgraded to work with both 2.7 and 3.9. Lessons learned:

  • At least under Cygwin, Python 3 uses a different default encoding for roll-and-scroll interfaces. I needed to run:
    • sys.stdout.reconfigure(encoding='iso-8859-1')
  • when Fixer invoked Python 3 via a system call and redirected output to a file. Note that "reconfigure" was implemented in Python 3.7 and may not work in earlier versions. Everything may have worked out of the box if Fixer was using "file write" commands instead of simple "print" commands, but I don't plan to change it because the whole thing will be rewritten in native Python soon-ish.
  • Python 3 changed the way Python compares strings and integers. In Python 2, "1" > 1 was "True" because any "string" value was greater than any "int" value. In Python 3 it generates a TypeError. It's a good thing, but it threw me for a loop for a bit.

Ahasuerus (talk) 14:24, 7 August 2023 (EDT)

"mw_objectcache" in the ISFDB Wiki - abnormal growth

We have been struggling with an odd disk space issue for the last few weeks. Here is what I have found so far.

The ISFDB Wiki uses the MySQL table mw_objectcache as its caching mechanism. Apparently the choice of MediaWiki's caching mechanism is controlled by the value of $wgMainCacheType in /var/www/html/wiki/LocalSettings.php . We currently have it set to "CACHE_ANYTHING", which, according to MediaWiki documentation, translates to "CACHE_DB", i.e. "mw_objectcache", on our system:

  • CACHE_ANYTHING – Use $wgMessageCacheType or $wgParserCacheType if they are set to something other than CACHE_NONE or CACHE_ANYTHING. Otherwise use CACHE_DB.
  • CACHE_DB – Use the database table objectcache.

A few weeks ago I noticed that we were running low on disk space. Running:

sudo ls -lah /var/lib/mysql/isfdb|grep G

identified the culprit:

-rw-r----- 1 mysql mysql  2.2G Aug 28 13:47 mw_objectcache.MYD

Since I truncated mw_objectcache just a couple of days ago, it means that it is abnormally large and growing rapidly.

Running:

select DATE(exptime),count(*) from mw_objectcache group by DATE(exptime)

produced the following results [last run a couple of hours ago]:

+---------------+----------+
| DATE(exptime) | count(*) |
+---------------+----------+
| 2023-08-28	|	47160 |
| 2023-08-29	|	79942 |
| 2023-08-30	|  	115 |
| 2023-08-31	|  	110 |
| 2023-09-01	|  	102 |
| 2023-09-02	| 	2434 |
| 2023-09-03	|   	167777 |
| 2023-09-04	|	73630 |
| 2023-09-23	|   	10 |
| 2023-09-24	|   	49 |
| 2023-09-25	|  	670 |
| 2023-09-26	|	17734 |
| 2023-09-27	|	12892 |
| 2024-08-25	|   	87 |
| 2024-08-26	|   	97 |
| 2024-08-27	|   	99 |
| 2038-01-19	|   	58 |
+---------------+----------+

It looks like some Wiki processes which update mw_objectcache set the expiration time to 24 hours, while other processes set it to 1 week, 1 month or even 1 year. ("2038-01-19" is a known issue with JavaScript and doesn't happen often.)

I have checked the date/time stamp on LocalSettings.php and it hasn't been changed since December 2022, so it shouldn't be causing this issue. Would you happen to be aware of any other Wiki-related changes which may have happened over the last month?

If we can't identify and fix the problem then I guess we'll need to modify the daily backup script to TRUNCATE mw_objectcache right before the backups kick in. Ahasuerus (talk) 14:00, 28 August 2023 (EDT)

I don't think here has been any Wiki-related changes since the move. There have been a handful of similar complaints about mw_objectcache over the years elsewhere, but didn't find anything recent or very useful in terms of the root cause. Running the query on isfdb2 shows similar results:
mysql> select DATE(exptime),count(*) from mw_objectcache group by DATE(exptime);
+---------------+----------+
| DATE(exptime) | count(*) |
+---------------+----------+
| 2023-08-30    |     2465 |
| 2023-08-31    |     3821 |
| 2023-09-01    |       84 |
| 2023-09-02    |     2468 |
| 2023-09-03    |   107963 |
| 2023-09-04    |     1966 |
| 2023-09-05    |     4590 |
| 2023-09-06    |     2207 |
| 2023-09-23    |       14 |
| 2023-09-24    |       32 |
| 2023-09-25    |      637 |
| 2023-09-26    |    11788 |
| 2023-09-27    |      376 |
| 2023-09-28    |      837 |
| 2023-09-29    |      419 |
| 2024-08-25    |       89 |
| 2024-08-26    |       54 |
| 2024-08-27    |        1 |
| 2038-01-19    |       34 |
+---------------+----------+
The cache is also large there:
    -rw-r----- 1 mysql mysql 1139418628 Aug 30 10:11 mw_objectcache.MYD
Alvonruff (talk) 10:13, 30 August 2023 (EDT)
Thanks for checking isfdb2.org; I didn't think of that.
For now, I have modified the backup script to use "--ignore-table=mw_objectcache", which should take care of the immediate issue with the daily backup files getting large and not fitting on a single DVD disc. (I also back them up online, on a USB stick, on an SSD drive and on an external hard drive, but non-magnetic media that can't be easily erased is another line of defense.)
Curiously, checking the disk space, I see that mw_objectcache is only 77MB as of 5 minutes ago. I truncated it yesterday night and it should be much larger 18 hours later based on what we have seen over the last few weeks. I wonder if the changing growth pattern may be due to various Web spiders accessing different subsets of the MediaWiki Wiki pages which get cached with different expiration dates based on whatever algorithms the PHP code is using.
Oh well, something to keep an eye on going forward. Thanks for checking! Ahasuerus (talk) 13:12, 30 August 2023 (EDT)

DDOS protection

Yesterday (2023-09-11) the live site was targeted by malicious robots. They hammered the site for about an hour, then stopped. They returned this afternoon (2023-09-12) at 12:30pm.

Here are the specifics as far as I could tell:

  1. A three-digit number of concurrent processes. It wasn't enough to make the site unavailable, but it slowed everything down to a crawl.
  2. Originating IPs from multiple countries, including multiple Chinese provinces.
  3. Random access to random Web pages, both on the Wiki side and on the database side.
  4. All types of pages were accessed on the database side -- display, add, delete, clone, vote, unmerge, etc.

Coming on the heels of the LibraryThing and related DDOS attacks over the Labor Day weekend -- which included demands for ransom money -- this is disconcerting. We are not as big as LibraryThing, but the number of estimated monthly accesses to our site is within an order of magnitude. If a hobbyist site like LibraryThing can be attacked, other hobbyist sites may be in danger as well.

It's possible that the attackers were just poorly configured Web crawlers, but I would bet that they were fishing for vulnerabilities to DDOS and/or SQL injection attacks. Apparently you can buy a DDOS attack cheaply these days, but it still costs money, so the attackers needed to have a business plan as opposed to doing it on a whim. I suppose it's also conceivable that the attackers were state-sponsored actors who were looking for vulnerable sites to add to the list of sites to take down if and when the sponsoring state decides to pull the trigger, but the fact that they returned today makes it less likely. Not that it really makes a difference from our perspective.

Based on the above, I think it makes sense to look into possible countermeasures. The fact that we are small fish in a big ocean may no longer provide us with the same kind of protection that it did in the past. Cloudfare is apparently the leading provider in this area and their introductory plans are not too expensive, but the devil is in the details. Perhaps other companies may be a better match for us. I know little about this area, so I am just mentioning what I have seen so far. Ahasuerus (talk) 13:27, 12 September 2023 (EDT)

Death's Head

You are PV1 for this title: https://www.isfdb.org/cgi-bin/pl.cgi?97321 I just submitted the following edit: Submitting two external IDs (LCCN & Goodreads), three webpage reviews, & added material to the pub note. Cheers. Mike (talk) 22:51, 7 October 2023 (EDT)