PDX After School


Bug Fix #2: Nonsense Error Message When Saving Profile

Today I received feedback that a provider was receiving an error message when attempting to save the company profile. The error looked like this:

Fatal error: Uncaught PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘Provider Name’ for key ‘name’ in /var/www/pas/lib/vendor/propel/propel/src/Propel/Runtime/Connection/StatementWrapper.php:194
Stack trace:
#0 /var/www/pas/lib/vendor/propel/propel/src/Propel/Runtime/Connection/StatementWrapper.php(194): PDOStatement->execute(NULL)
#1 /var/www/pas/lib/vendor/propel/propel/src/Propel/Runtime/ActiveQuery/Criteria.php(2451): Propel\Runtime\Connection\StatementWrapper->execute()
#2 /var/www/pas/lib/vendor/propel/propel/src/Propel/Runtime/ActiveQuery/ModelCriteria.php(1722): Propel\Runtime\ActiveQuery\Criteria->doUpdate(Object(Propel\Runtime\ActiveQuery\Criteria), Object(Propel\Runtime\Connection\ConnectionWrapper))
#3 /var/www/pas/lib/propel/Base/Provider.php(1419): Propel\Runtime\ActiveQuery\ModelCriteria->doUpdate(Object(Propel\Runtime\ActiveQuery\Criteria), Object(Propel\Runtime\Connection\ConnectionWrapper))
#4 /var/www/pas/lib/propel/Base/Provider.php(1233): Base\Provider->doUpdate(O in /var/www/pas/lib/vendor/propel/propel/src/Propel/Runtime/ActiveQuery/Criteria.php on line 2462


Really, though, the error boils down to:

Duplicate entry ‘Provider Name’ for key ‘name’

This is saying that the provider name which was entered already belongs to another provider (duplicate). The point is to prevent confusion by forcing providers to use unique names. This helps users recognize the difference between providers. The real problem here is the confusion the error message causes, so I have updated the system to “catch” the error and return a readable error like the one in the picture.

This can sometimes happen when a provider signs up with multiple E-mail addresses. You may not have liked the E-mail address you used first, or you forgot which one you used, or someone else at your organization signed up. In any case, each unique E-mail address creates a unique account. For instance, if I create a provider using “zeal@egrobotics.com”, and I fill in my provider name “EG Robotics”, then someone else creates an account using “egr@egrobotics.com” and tries to fill in their provider name as “EG Robotics”, this will cause an error.

The solution, in that case, is to log in with the E-mail address you do not prefer, and change your provider name to something random that does not conflict. Then you can log in with your preferred address and use your preferred provider name. If you were able to log in and set your provider name, then you received a confirmation E-mail at the address you provided, so you can search your E-mail inboxes for that confirmation if you forgot which E-mail address was used before.

Feedback #2: Internet Explorer

Today I received feedback that some of the postings were appearing to overlap each other, creating a jumble of text, in the latest version of Internet Explorer 11.

Because I have ready access to IE11, and because the fix was trivial and could be applied without affecting any other browsers, I have fixed this particular rendering issue.

However, as fewer than 3% of users worldwide use Internet Explorer, and the number continues to decrease, my preferred solution would be to encourage users to make the switch to a browser that is compatible with modern internet technologies. On Windows 10, simply use Edge instead. Microsoft is no longer developing Internet Explorer. IE is only included with Windows 10 for legacy reasons. On other computers, use Chrome, FireFox, or Safari. I understand there may be some workplace computers that are restrained to using Internet Explorer. In this case, I would recommend using a mobile device to view PDX After School. IE11 was released 4-5 years ago. By contrast, Edge had a major release six months ago, and Firefox and Chrome both had major version releases last week.

If you are in the habit of using Internet Explorer, this is not the only website you will experience issues with. It takes a lot of time and effort to support an extremely outdated browser, so fewer and fewer websites will continue to do so. The internet and related technologies continue to evolve to provide better and better user experiences, but Internet Explorer will not.

Thanks for the feedback! I hope this helps.

Mission, Motivation, and Devotion

PDX After School is operated and developed by me (Zeal Mayfield). I am director of technology at To Every Kid, a 501(c)(3) non-profit. We operate an after-school robotics program in PPS, as well as a children’s technical training center in Lake Oswego called “The TEK Center”. We originally conceived the idea of a website of this nature after our first experience with PeachJar, because we had many reservations about the way they do business and the true value of their service.
I have had feedback that represented a couple different feelings about our service, mostly falling into the following categories:
  • Concern that because TEK (To Every Kid) has a stake in the after-school market, we may use the service to unfairly advantage ourselves in relation to other providers.
  • Concern that we may not be fully committed to developing the platform, and it might die off or fizzle out at some point.
In response to those concerns:
Because our business, and our non-profit mission depend on communication with parents, we are completely committed to making PDX After School the best possible single source of accurate information regarding after-school opportunities in the greater metro area. Also, I love programming 😉 so this is a labor of love for me.
In order for the website to be effective, its user-base needs to grow to include anyone and everyone who wants information about after-school activities, and its listings need to grow to include every after-school provider and every activity being offered. If we were to use the platform to unfairly advantage ourselves, providers would be reluctant to use our service, and our listings would become incomplete, which would lead to the platform no longer being the best source of information, resulting in the user-base abandoning the platform, destroying any benefit to us that the service represents.
We are committed to fair and honest administration of the service, and we believe the chief goal is to provide what parents want, in the format parents want. In the end, the number of parents using PDX After School is the key factor which will drive providers to list on the website, so we are focusing on allowing providers to offer what parents want, rather than showing parents what providers want them to see. I believe this is a key difference from flyer distribution.

Solution #1: Same activity name for different grade ranges

As detailed in my previous post, the inability to create activities with the same name is not a bug. Rather, it is a useful rule which helps avoid confusion. However, it has come to my attention that it may be common practice, for whatever reason, to offer activities at different schools with different grade range restrictions.

At first, I thought this would be due to the particular grade range that a given school serves. As such, I built into the listing for each school that only the overlap between the activity grade range and the school grade range will be shown. Multiple providers, however, have expressed the need for grade range restrictions on a subset of the schools they serve, which do not relate to the grade range of the given schools. As I stated in my previous post, the best way to achieve this, is to create multiple activities with the grade range in their names.

Given that is my recommended solution, I have built it into the system. If a provider attempts to save an activity with a name that matches a pre-existing activity, and a grade range that differs, the new activity will automatically have its grade range appended to its name. I’m calling this a “solution” rather than a “bugfix” because it helps solve a problem in how we use the system rather than a problem with how the system works.

Bug Fix #1: Incorrect URL error when URL is actually correct.

I recently fixed a bug which caused the system to report a valid URL as invalid.

When the PDX After School server tests a URL to check whether it is valid, it tries to access the page, then it checks whether a web page is returned. Some web sites do not allow anything other than a common browser to access their content. Common browsers use a description to identify themselves, called a user agent string. In order to fix the problem, I set PDX After School to provide a user agent string to identify it as a browser when it checks URLs.

Feedback and Requests

Comment on this post with any problems you are having with the site, tweaks I should make, or features you want added.

Features I’m currently working on:

  • Gallery Images — display gallery images in stylish image slider, allow provider to remove gallery images.

Feedback #1: Duplicate Activities, URLs, and Gallery Photos

Here are some of the things I have received feedback on:

Problem: Unable to add an activity with the same name for a different grade range.
Solution: Name your activity something like “Example Activity (grades 3-5)”
Explanation: I have placed a limit that ensures an activity cannot be posted twice at the same school. This helps ensure that a glitch doesn’t accidentally fill a school’s listing page with many duplicates of the same activity. There is also a limit that disallows a provider from having multiple activities with the same name. This helps avoid confusion and accidents as well. I think it’s clearest to name your activities differently so that parents can easily identify the difference.

Problem: I’m getting an error about an incorrectly typed web page.

  1. Web page URLs are deceptive. I might think that my web page URL is ‘www.egrobotics.com’ because if I type that into a web browser I will reach my web page, but in fact my browser is very good at guessing my web page’s actual URL, so it seamlessly converts to ‘https://egrobotics.com/’ and I’m none-the-wiser. If I visit my web page and wait for it to load completely, then I can copy the entire contents of the address bar to get my actual URL. Try doing that when you are entering web page addresses on PDX After School.
  2. Another possibility is that the web page is not reachable by everyone. The URL of my Gmail inbox is “https://mail.google.com/mail/u/0/#inbox”. But you can’t reach it without logging in using my credentials. Browsers use cookies to store extra information that is not present in the URL. If someone without your stored cookies tries to visit a page that requires them, it will fail. Make sure that the URL you are posting on PDX After School is reachable by anyone, then make sure it is a full URL (full web page URLs always start with ‘http’).

If you’re sure: If you’re sure your URL is complete and accessible, send it to me through the contact form, and I will test it so I can find the bug you are experiencing.

Problem: When I upload gallery photos they look strange, they don’t show up in my listings, and I can’t delete them.
Planned Solution: The gallery feature is something I am planning. I added the ability to upload gallery photos from the outset so It will be less hassle to implement the remaining parts of the feature. For now, sit tight. I will add the ability to delete your gallery photos, and the ability for users to browse through them on your listings. The images will appear in a stylish, animated image slider both in your profile and in your listings.

Service Cost

Currently it is free to post listings on PDX After School. When we originally conceived of this project with a few other after-school providers in Portland, it was accepted that the service would have to cost something in order to support itself. I realize that more providers than the original group have joined the site, and may not know that this will eventually become a paid service.

I would love to provide this as a free service, because I’m passionate about this project, but there are more costs involved than my labor. It costs money to operate a web service and it costs even more money to advertise a web service. My employers at To Every Kid have generously allowed me to spend some of my workday on developing this site, but my labor needs to result in some income for the company as well.

As such, we have discussed the price of $5.00 per listing, (listing = one activity at one school). With PeachJar, an equivalent listing costs $25.00. Unlike PeachJar, we won’t be gouging some providers and cutting deals for others.

I believe we can build this platform into something infinitely more valuable than PeachJar. The key advantage of this platform is that it will be 100% driven by what parents of after-school students want. While engineering PDX After School, I wanted to make it easy to:

  • Know what programs are at your school.
  • Know what fits your schedule.
  • Know whether children of your student’s grade can participate.
  • Compare information in one format.
  • Opt into receiving notifications.
  • Choose not to receive notifications without completely losing the ability to see what is happening at your school.

What do you think? Is this worth $5 per listing? Is there a specific feature that would convince you?

Development Blog

Hello! My name is Zeal Mayfield. Right now, I’m the sole developer working on PDX After School. The current state of PDX After School represents what we call an MVP (Minimum Viable Product). I am starting this blog to let you (the site’s users) know about what is currently planned for PDX After School, and to get feedback such as bug reports and feature requests so that things of that nature can become public knowledge.