Opened 4 years ago

Closed 13 months ago

Last modified 13 months ago

#128 closed defect (fixed)

Path isn't set when adding project

Reported by: rmccue Owned by: markoheijnen
Milestone: 1.0 Priority: major
Version: 0.1 Component: general
Keywords: Cc: juanramondiaz, stas@…


The "path" field is not set by GlotPress when attempting to add a project to the database. As the field in the schema is marked NOT NULL, this causes the project to not be created. Additionally, no error is displayed when this occurs.

Attachments (2)

128.diff (379 bytes) - added by markoheijnen 13 months ago.
Validate slug
128.2.diff (1010 bytes) - added by markoheijnen 13 months ago.
Includes 1 unit tests

Download all attachments as: .zip

Change History (15)

comment:1 juanramondiaz2 years ago

  • Cc juanramondiaz added
  • Resolution set to worksforme
  • Status changed from new to closed

For me, it's working fine. This ticket was opened 16 months ago, so maybe it's an old bug.

comment:2 mtekk2 years ago

  • Resolution worksforme deleted
  • Status changed from closed to reopened

I can reproduce this one on my live site but not on my testbed. Not sure what server side is causing this to happen. It would probably be better to set everything in the insert query for the project rather than insert a partial project and update with the path shortly afterward.

If you need any additional information about my two environments I'll try to provide it.

comment:3 petervanderdoes2 years ago

  • Keywords reporter-feedback added
  • Owner changed from somebody to petervanderdoes
  • Status changed from reopened to accepted

Let's revive this one :)

First is this still an issue? If yes continue if not, glad I could help LOL.

Please update to the latest revision of GlotPress.

If it's still an issue:

  1. What's the name of your project?
  2. Do you set the slug or let GlotPress handle it?
  3. Is it a child project? If so the questions 1 and 2 apply to the parent as well.

For both production and test bed.
PHP version

I just hope it's no longer a problem :)

comment:4 sushkov18 months ago

  • Cc stas@… added
  • Keywords dev-feedback needs-testing added
  • Milestone set to 1.0
  • Version set to 0.1

comment:5 willmot18 months ago

I tested this locally.

project name test, slug left blank, path is correctly set to test.
sub-project name test, slug left blank, path is correctly set to test/test.
project name @@@, slug left blank, path is set to blank. Project is created but impossible to navigate to.

Looks like there is an issue when the name contains only characters that can't be slugified.

comment:6 tschutter14 months ago

I have the same problem running NGINX 1.2.7, PHP 5.4.

It did not matter what I used as a slug. It resulted in the path not being set.

Temporary solution for me was to allow NULL for path in the DB. Because the path is set in another query it wasn't a problem.

comment:7 markoheijnen13 months ago

  • Owner changed from petervanderdoes to markoheijnen
  • Status changed from accepted to assigned

I see issues with what willmot described. However not what tschutter described when running nginx 1.2.5/1.2.7 and PHP 5.4.4. I will be working on a fix. Something in the way of checking/creating the slug before inserting the project. When empty return an error.

markoheijnen13 months ago

Validate slug

comment:8 follow-up: markoheijnen13 months ago

I added a patch. This seems good enough. Curious what you guys think about it.

Last edited 13 months ago by markoheijnen (previous) (diff)

comment:9 in reply to: ↑ 8 markoheijnen13 months ago

Last edited 13 months ago by markoheijnen (previous) (diff)

markoheijnen13 months ago

Includes 1 unit tests

comment:10 markoheijnen13 months ago

  • Keywords has-patch added; reporter-feedback needs-testing removed

Just added another patch testing a project with @@@@ as name.

comment:11 markoheijnen13 months ago

  • Keywords commit added

comment:12 markoheijnen13 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [744]) Don't allow slug to be empty. This can happen when the project name has only illegal characters. Fixes #128

comment:13 markoheijnen13 months ago

  • Keywords dev-feedback has-patch commit removed
Note: See TracTickets for help on using tickets.