Site programming questions

From Math Images
(Redirected from Site programming portal)
Jump to: navigation, search

These are questions about and problems with the site that probably need to be addressed by a programmer who knows the Mediawiki software in general quite well, and possibly the Math Images implementation of the software in particular.

Technical problems with the site

This is a list of problems with the site, large and small, that probably need to be fixed by a programmer. If this list gets long enough, be better organized or grouped and maybe moved to its own page.

Big Problems

Pages not showing up in thumbnail gallery or main page - open

Some pages, which I have tagged as "ready" are not appearing in the thumbnail gallery nor on the main page, as they should when I change those tags. For example Law of Cosines is working as expected, but Law of Sines and Quipu are not. -AnnaP

Outages/Site is down periodically - inprogress

From time to time the site goes down - where the Main_Page is inaccessible but standard wiki pages like login, etc work. It seems to fix itself eventually.

error message:

Warning: file_get_contents( [function.file-get-contents]: 
failed to open stream: HTTP request failed! in /var/www/html/mathimages/extensions/HTMLets/HTMLets.php on line 100 Failed to load html file home.php

We started php's error_log on nickel:/var/log/httpd/php_error_log

We've seen problems in the past with htmlets extension bringing the site down. The Main_Page is really just an htmlet of home.php with caching turned off

We're also seeing a ton of requests from nickel to for each homepage request: - - [05/Jul/2011:15:33:30 -0400] "GET /mathimages/index.php/HashInfo HTTP/1.0" 200 22497 "-" "-" "-" - - [05/Jul/2011:15:33:30 -0400] "GET /mathimages/imgUpload/Butterfly1.gif HTTP/1.0" 200 22658 "-" "-" "-" - - [05/Jul/2011:15:33:30 -0400] "GET /mathimages/imgUpload/DI_vecfield.jpg HTTP/1.0" 200 251809 "-" "-" "-" - - [05/Jul/2011:15:33:30 -0400] "GET /mathimages/imgUpload/4dtorus.jpg HTTP/1.0" 200 15168 "-" "-" "-" - - [05/Jul/2011:15:33:30 -0400] "GET /mathimages/imgUpload/Complexvectorlabeled3.JPG HTTP/1.0" 200 35039 "-" "-" "-" - - [05/Jul/2011:15:33:30 -0400] "GET /mathimages/imgUpload/Monkey-Saddle.jpg HTTP/1.0" 200 29262 "-" "-" "-" - - [05/Jul/2011:15:33:30 -0400] "GET /mathimages/imgUpload/Fountainflux.gif HTTP/1.0" 200 133148 "-" "-" "-" - - [05/Jul/2011:15:33:30 -0400] "GET /mathimages/imgUpload/Revolutionvolume1.gif HTTP/1.0" 200 1378955 "-" "-" "-" - - [05/Jul/2011:15:33:30 -0400] "GET /mathimages/imgUpload/Coordchange.JPG HTTP/1.0" 200 62890 "-" "-" "-" - - [05/Jul/2011:15:33:30 -0400] "GET /mathimages/imgUpload/HenonMain.jpg HTTP/1.0" 200 53534 "-" "-" "-" - - [05/Jul/2011:15:33:30 -0400] "GET /mathimages/imgUpload/DragonCurve.jpg HTTP/1.0" 200 110239 "-" "-" "-" - - [05/Jul/2011:15:33:30 -0400] "GET /mathimages/imgUpload/NewtonBasin2.jpg HTTP/1.0" 200 72481 "-" "-" "-" - - [05/Jul/2011:15:33:30 -0400] "GET /mathimages/imgUpload/Sol-Koch.jpg HTTP/1.0" 200 105839 "-" "-" "-" - - [05/Jul/2011:15:33:30 -0400] "GET /mathimages/imgUpload/Anna1.jpg HTTP/1.0" 200 43273 "-" "-" "-" - - [05/Jul/2011:15:33:30 -0400] "GET /mathimages/imgUpload/Fs_64_100.gif HTTP/1.0" 200 105033 "-" "-" "-" - - [05/Jul/2011:15:33:30 -0400] "GET /mathimages/htmlets/home.php HTTP/1.0" 200 17503 "-" "-" "-"

TOC for hidden material - open

Look at Wiki Tricks to see the code we're using to make things hidden.

The template we use to create our pages automatically hides a lot of important content (the "More Mathematical Explanation"). The point of this is so that users with less math-y backgrounds aren't frightened away by the pages. We'd really like to be able to keep doing that, but to do so looks like it'd require changing the way the TOC works.

Currently, if a subsection of a page is hidden by default, a link to that subsection is included in the table of contents, but clicking on the link often doesn't do anything. The details of the behavior are really bizarre, as in the following example.

In the Fibonacci Numbers page, the links exhibit this really strange behavior:

  • Clicking on 2.1 or 3.1 in the TOC does nothing, even if the target of the link is unhidden
  • Clicking on 2.2, 2.3, or 3.2 in the TOC works, even if the target hidden
  • Clicking on 3.5.1 in the TOC works even if the target is hidden, but if all of 3.5 is hidden, it doesn't work
  • Clicking on any other 3.x or 3.x.x in the TOC works if the target is unhidden, but not if it is hidden
  • Unhiding and rehiding text seems to cause the same behavior as never unhiding the text in the first place

Studies with participant readers have shown that, not surprisingly, these dead-seeming links in the TOC can be confusing and frustrating, and lead readers to conclude that the hidden content may not be available on the page.

Abram 18:48, 25 April 2011 (UTC)

Helper Page template - open

  • The Helper Page template doesn't work in Safari. See Geometric Sequence.
    We've recently discovered that the template isn't working with Chrome or the newest version of Firefox either. Those two browsers give an error message about JavaScript that says to contact site administrators.
    • I changed the helper page template: (This is now documented at Help:Wiki_Tricks#Helper_Pages -Amir)
      • it automatically tags the page that uses it in the helper page
      • it doesn't use the balloon extension anymore - its a table off to the right. and it's always showing
      • it doesn't use absolute positioning
Kate 18:39, 21 June 2011 (UTC): Awesome, thanks!
Kate 20:19, 11 July 2011 (UTC): Hey guys, you said above that the new template updates automatically, but when we're using it, it doesn't seem to. See Radians as an example of a helper page that is linked to but which has an empty box. Should we still just be putting in pages manually?

Browser Compatibility - Images - open

Htasoff 00:10, 23 June 2011 (UTC)

  • Some of the images on Real Projective Plane and Mobius Strip show up extremely dark, practically black in Safari, but normal in Firefox
    • Furthermore, in Safari, when you follow the links in these images, they show up normally.
    • When you download the images, the thumbnails are black, as is the image when viewed in Preview.
    • Nevertheless, the images open fine in Photoshop and Illustrator.
  • I think this may be an overarching problem. It certainly is more expansive than a mere problem with the images, as they work with several programs, but not others.

Browser Compatibility - Printing - open

  • Richard was unable to print Law of Cosines from Firefox, even after creating a different page with the same content. This might be Firefox's fault, though.
  • Had the same issue trying to print out the page Pigeonhole Principle using Firefox. Safari worked just fine though. Richard 7/8

math template not working (June 2012) - open

The <math>...</math> environment works fine to produce TeX code, but often it would be nicer inline to use the html environment

{{math|...}} as described at [1]. However, this is not working on our wiki, and without the environment, most of the commands within it, like {{radical|2}} lead to parse errors. Where are the needed templates?

Smaller Problems

  • "Upload a new version of this file" doesn't always seem to replace the file. More info:

When I try to change the picture on one of one of my pages I get an error message saying "Error creating thumbnail" and the image is not uploading. I would appreciate help with fixing this issue. The page is Volume of Revolution, and I am trying to change the image to Revolution2.gif. If you need any more information, I check my user page every weekday.

Nordhr 10:55 13 July 2011.

I uploaded an [image], then later uploaded an updated version of it, but the thumbnail stayed the same. When you click on it, the updated version shows up (image]), yet when I put it up on my math page, the old version shows up. I ended up changing the name of my image and uploaded that one.

--Chanj 18:11, 13 July 2011 (UTC)
This might just be because your browser isn't updating/reloading the image on that page. Check by using CTRL+F5 / etc... to hard refresh the page to make sure.
--Rguo 21:43 13 July 2011 (UTC)
I don't think it's my browser's problem. I refreshed, cleared cookies, and tried it on someone else's computer, and it's still like that. Does it work for your browser?
--Chanj 14:46, 15 July 2011 (UTC)
I'm getting a preview for the older version on the image's upload page, but when I add it to a page, it gives the updated version properly.
-- Rguo 17:53, 15 July 2011 (UTC)
19:53, 15 July 2011 (UTC): This is a problem most of us have been having as well. We've just been either retitling the pictures or usually if you change the size (ie make it 251px instead of 250px) it works. Since there is a way to get around it, even though it's an ugly one, I'm going to move this to the less important questions section.

Automatic Renumbering of Displayed Equations - open

It would be great if using a modification of EquationRef or our own EquationRef2, one could get screen output Eq. (x), where x gets updated as more equations are tagged. This requires the Wiki underlying language to have counters, but it seems it does, because I have seen add-ons discussed on the WikiMedia pages that implement counters (but I haven't seen an equation counter). Ideally, we would have a command {{EquationRef3|foobar}} , where foobar is the mnemonic name we choose for the display, but what would be output would be the same as the current {{EquationRef2|foobar|Eq. (x)}}, where x would be updated each time the file is displayed. Furthermore, the built-in macro {{EquationNote|foobar}} should refer to that display, just as it does now to a display created using EqationRef2. (LaTeX has built in equation numbering updates, but it is not a part of LaTeX that has been ported to wikis.) Smaurer1 16:15, 27 May 2011 (UTC)

Credits page uneditable - open

The credits page is generated automatically. But what if one makes a new version with a slightly different name of an old page (so as to leave the old version untouched in case one wants to use parts of it or wants to revert to it) and later redirects the old links to the new page? All the credit to the original writers is lost. This problem would be solved if the credit page was editable, but clicking on the edit button while on the credit page just shows the source code for the main page. Smaurer1 16:44, 8 June 2012 (EDT)

Text alignment in first panel of the Main Page - open

The first panel of the Main Page ("About Math Images") includes two random images. If the first image doesn't take up enough vertical space, the second paragraph of text ("Our goal...") sits literally on top of the first paragraph of text, rather than being below it like it should. If you keep refreshing, you'll fairly quickly get a random image that causes this problem.

Abram 18:48, 25 April 2011 (UTC)

Marking certain pages as unsearchable - open

Ann and Abram and Anna are doing a study using the Math Images pages, and for this they need to have some pages that are near duplicates of other pages. They would like these pages not to show up in the search results. Limiting access to them via permissions would also be an acceptable solution.

Searching the Help articles - open

As far as I can tell, there is currently no way to search within the body of the Help pages. Would it be possible to implement this in some manner?

More specifically - I knew that one page I'd read had mentioned using APA citations, I wanted to find it again, I tried searching "APA" and got no results. I've tried a couple other searches with text I know to be contained in the body of Help pages, and Help pages never show up in my search results.

Abram has pointed out that this might possibly be the opposite problem from getting research-related pages to not show up in search.

Resolved problems

Browser Compatibility - Access - done

  • Kate was unable to open any Math Images pages in Firefox for several hours on Tuesday 6/7. Other pages opened in Firefox, including
    • unless you were able to open MI pages in another browser it's likely this was just an outage on the server side - not a browser issue but still important (see "Outages" above)

Automatic Lists - done

Browser Compatibility - Main_Page in Chrome - open

in chrome the text of the first paragraph leaks out of the border


Technical questions about the site

These questions are also for programmers, but they are questions, not problems.

Hi everyone, I was wondering if there is a way to change the size of the main picture on a page. I have a page where it would be really nice to have the main image be larger than the template has it automatically, so I was hoping that someone could help me change the size. Thanks!

Nordhr 13:21 18 July 2011

I noticed that, previously, Tim Cheeseman was able to upload html files and such into subdirectories for displaying JavaView applets on the site in a workaround that would allow the html barred on the wiki and necessary to get the applet to work to be visible. The additional access to creating subdirectories would also help greatly with the JavaView applets that Reza and I are looking into add to the site for 3-D modeling applets. of JavaView on the Wiki -- the files he used are located

--Rguo 21:48 13 July 2011 (UTC)

I was wondering if there is a way to pause GIF animations that are also framed, in a table, or aligned to one side of the page. The method for pausing GIFs described on the WikiTricks page won't work with the other formatting I want for my animations.

On a related note, does anyone know if there is a way to set a GIF so that it will start paused when readers come to the page? Thanks.

--pweck1 31 May 2012

Another question. The field category for dynamical systems is called dynamic systems, without the -al. Is there a way to change the name of the category that would also change the name on all the pages that link to it? Thanks!

--pweck1 8 June 2012

Answered Questions

Creating a new banner flag - DONE

Abram and I (AnnaP) want to create a banner flag to go across the top of pages that are used for research so that people won't delete duplicate pages (which are duplicates for a reason) or force redirections we don't want. How do we go about that?

how about this? although I'm curious why there are duplicate pages? see Help:Wiki_Tricks#Notices -Amir

  • alternatively you can lock pages - a sysop can click "protect" on those duplicate pages
Abram 23:23, 11 July 2011 (UTC): Thanks, Amir. Before I saw this note, I erased the content of all the research pages, except for the few that are still active, replacing the content with the note "Please don't delete this page". This way, the old content of these pages is in the history, but it doesn't show up in searches. I can add that banner to those pages also. For the few pages that are still being used by participants in studies, I'll just lock the pages.
We don't have any actual duplicate pages. We just have a lot of pages that are very similar to existing pages but have been modified to accommodate research studies. In one study, for example, we're seeing what people learn from reading the pages, but we needed to shorten an existing page to make it an appropriate length for one sitting.

Difficulty Categories

I can't figure out a way to get things into/out of the 'higher education' category. I found on another person's page how to change lower level difficulties using Something=No, but I couldn't find one for higher education. Currently there are a lot of pages in difficulty categories where they don't belong (such as Pre-Kindergarten). I feel it would be a good addition to the 'edit with form' set up if there were check boxes with all of the difficulties.

Update: I found the tag for higher education (it is HigherEd).

Nordhr 12:37, 7 June 2011 (RPI)