Website Development Blog
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: 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 “firstname.lastname@example.org”, and I fill in my provider name “EG Robotics”, then someone else creates an account using “email@example.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.
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.
- 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.
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.
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.
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.