Technical Contact (Please look at posts below for updates)

Website Development Blog

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

Yikes!

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.