Coder Social home page Coder Social logo

timble / openpolice-platform Goto Github PK

View Code? Open in Web Editor NEW
18.0 9.0 8.0 35.37 MB

An open source web publishing platform for police forces.

Home Page: https://www.timble.net/platform/open-police/

License: GNU Affero General Public License v3.0

Ruby 0.20% JavaScript 20.15% PHP 66.79% CSS 12.48% Shell 0.17% HTML 0.19% Nginx 0.03%
open-government open-data php agplv3 government open-source foss police web-platform cms

openpolice-platform's People

Contributors

amazeika avatar bitdeli-chef avatar chanced avatar ercanozkaya avatar jowillems avatar mmeinert avatar stevenrombauts avatar tomjanssens avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openpolice-platform's Issues

Suppressed warnings being thrown

There seems to be an issue with the @ operator on staging. A generated warning is still being thrown although we suppress it using the at operator.

Example : editing attachment cropping in administrator/news fails and will throw this error

message: "Exception 'Nooku\Library\ExceptionError' with message 'file_get_contents(/var/www/v2.lokalepolitie.be/capistrano/releases/20140403110356/application/admin/component/attachments/resources/language/nl-NL.ini): failed to open stream: No such file or directory' in /var/www/v2.lokalepolitie.be/capistrano/releases/20140403110356/vendor/joomla/language/language.php:358", code: 500, data: { file: "/var/www/v2.lokalepolitie.be/capistrano/releases/20140403110356/vendor/joomla/language/language.php", line: 358, function: "Nooku\Library\{closure}", class: "", args: [ ], info: "" }

file_get_contents() is being called using @ so this warning shouldn't be a problem, but it still bubbles up.

We experienced the same issue in the #658 ticket, where fsockopen in DatabaseRowUrl throws warnings when adding attachments (it fails but the warning is legit. It should be suppressed.)

Tip from Ercan: Sync KExceptionHandlerAbstract

Separate server configurations

Make sure the staging server gets its Nginx config from a staging branch, instead of master. Avoiding any "tests" going wrong!

New splash (intro) page

  • Improve responsiveness
  • Implement mechanism to translate the page based on the domain name (lokalepolitie.be, policelocale.be, …)

Previous reference: #722

New Relic nesting level

The following error has been popping up regularly in New Relic:

E_ERROR: Aborting! The New Relic imposed maximum PHP function nesting level of '5000' has been reached. This limit is to prevent the PHP execution from catastrophically running out of C-stack frames. If you think this limit is too small, adjust the value of the setting newrelic.special.max_nesting_level in the newrelic.ini file, and restart php. Please file a ticket at https://support.newrelic.com if you need further assistance.

This error is being logged into /var/log/newrelic/php_agent.log

Judging by incoming ticket request, this is happening during one of these two actions:

Try to debug this locally be setting a very small limit for the callstack in xdebug and then see where xdebug fails?

Disable persistent connections

The number of open connections keeps growing until the limit has been reached. For now, the wait_timeout has been decreased to make sure connections are being cleaned up automatically.

Todo:

  • Remove the ATTR_PERSISTENT setting in DatabaseAdapterMysql where the mysql connection is being made
  • Reset the server's configuration (wait_timeout + max_connections back to default)
  • Follow-up. If the situation has improved, apply the same change to Nooku Platform.

See: http://www.percona.com/blog/2006/11/12/are-php-persistent-connections-evil/
Also see: https://groups.google.com/forum/#!topic/comp.databases.mysql/SuaL7-G0iOc

Initial work on components & themes

Ticket for all custom components during initial development, including the custom themes.

  • Districts, manage districts officers
  • News, manage news
  • Police, manage cities and local police zones
  • Questions, manage frequently asked questions
  • Streets, manage streets within a police zone
  • Traffic, manage traffic related information (controls, constructions, measures, public events)
  • Trafficinfo, manage national traffic information

Network time-out error

One zone have reported that the page cannot be loaded when saving something, we can reproduce the issue depending on the network and OS.

Reported by:

  • 5421 - ticket 2
  • 5385 - ticket 4

Index Activities

See if we can push the activity streams into elasticsearch so we can aggregate the data in the /manager application.

Index attachments in support

The support component currently indexes every comment and ticket in Elasticsearch, but attachments are still missing. It would be great if we could open up attachments directly from the centralised /manager application as well.

Forms component

Initial development of a Forms component, the form should be emailed to the zone and requester and stored as a fail save.

An ID should be generated and provided to the user as a fail save if he does not receive his email.

Store data in one JSON-fied column since searching the data is not required, and this allows to create different forms easily.

Requested by

Why we are not using CAPTCHAs: https://www.gov.uk/service-manual/user-centred-design/resources/captcha.html

http://www.dobt.co/screendoor/

[5904] Don't limit streets

5904 is a fusion of 5430 (Beveren) & 5431 (Sint-Gillis-Waas/Stekene).

Need to disable the streets limitation temporary until we can change the police_zone_id for the cities of 5430 & 5431 in streets_cities to the new zone number.

Previous reference: #940

Multiple Homepage URLs

From Google Analytics:
View lokalepolitie.be is receiving hits from multiple pages that might serve the same content. Some examples are: /5342/fr/, /5342/fr/home.html. If your website serves the same content on these URLs, this content will have its hits split between multiple rows in reports.

Maybe we should add a redirect on the server? Redirecting home.html to the root.

Sites are also available with and without trailing slash, should look into a redirect for this as well.

City to many zones

At the moment each city ID (streets_city_id) has one linked zone (police_zone_id).

When zones are bundling forces we need the ability to temporary connect two zone numbers to one city.

Suggestion: create a streets_city_zones one-to-many table.

See also #20.

Elasticsearch backup strategy

We should still look into backing up the Elasticsearch cluster. This is not high prio for now as we can easily rebuild the entire support index using the import script (application/manager/component/support/controller/import.php), only takes a couple of seconds for now.

Instructions: http://www.elasticsearch.org/blog/introducing-snapshot-restore/

Recommended : setup the Knapsack plugin to easily copy data back and forth for testing purposes. See https://github.com/jprante/elasticsearch-knapsack

Run all traffic through HTTPS

Broken file downloads

Files with dots in the names are broken on the centOS servers. Example: http://www.lokalepolitie.be/5396/downloads/Politieraad%2FNotulen

Could be two things:

  • either pathinfo() on this platform (centOS) is implemented differently and we need a workaround for it,
  • the url encoding is creating this problem somewhere.

Or we can extend filename filter during upload. Don’t allow files with weird characters in the filename or rewrite the filename. Also, we should replace spaces in filenames with ‘-‘ or ‘_’ during the upload.

Update this support ticket once solved: http://www.lokalepolitie.be/manager/support/ticket?id=a3f4b4244853c95b0001046cb4f96e21

Streets database refactor

  • Currently streets relations are saved across multiple tables (districts_relations & traffic_streets), implement a centralised table 'streets_releations' similar to 'attachments_relations' (this will make streets future proof too)
  • Create a script to check if all streets in 'streets_relations' still exist since we are now weekly updating from AGIV and streets can be removed

Previous reference: #807

Improve street translations

To deal with regions that have multiple languages, we want to make sure we can lookup the streets in all languages and still display them correctly according to the chosen language.

  • Create a separate table called streets_streets_islps (street id, islp id)
  • Remove language2, title2, language3 and title3 fields from streets table
  • On importing, create a new row in streets for every available language

Previous reference: #914

Project Yellow

New template and information architecture.

Develop from the ground up and heavily inspire it on the best practices of GOV.UK.

Implement responsive images.

Minimum width/height

We need to add a minimum height/width setting for attached images. They need to be big enough so fit nicely in our responsive design, Twitter, Facebook, etc.

Need to figure out if we can do this before upload or we process the picture first then showing a message and remove the image again.

Max resolution
Check for the max resolution, we're having issues with 300 DPI images. See http://stackoverflow.com/questions/14358524/is-there-a-way-when-uploading-images-jpeg-to-check-the-dpi

[theme] Break out of an iFrame

Break out of an iframe, if someone shoves your site into one of those silly top-bar URL shortener things.

iFrames break our responsiveness.

Undefined method Nooku\Library\Date::getObject()

  1. Go to the districts at /administrator/5445/districts
  2. Make sure one of the items is checked out
  3. Click on the checked out zone
  4. You get "500 - An error has occurred, Call to undefined method Nooku\Library\Date::getObject()" error

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.