New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix empty title and domain_name when exception is thrown during fetch #3442

Merged
merged 3 commits into from Dec 14, 2017

Conversation

Projects
None yet
4 participants
@Kdecherf
Copy link
Contributor

Kdecherf commented Nov 26, 2017

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? -
Documentation no
Translation no
Fixed tickets #2053
License MIT

Entries will now have a default title when it's empty (because of an exception during the fetch):

  • basename part of entry's path, if any
  • or domain name

This default title does not replace the "No title found" of Graby when it fails to extract a title.

This PR still needs a test on EntryControllerTest using a mock.

Kdecherf added a commit that referenced this pull request Nov 27, 2017

Add test on EntryControllerTest for #3442
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>

@Kdecherf Kdecherf force-pushed the empty-entry branch from 054739c to e27d0ff Dec 1, 2017

Kdecherf added a commit that referenced this pull request Dec 1, 2017

Add test on EntryControllerTest for #3442
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>

@Kdecherf Kdecherf force-pushed the empty-entry branch from e27d0ff to 2233c5d Dec 1, 2017

Kdecherf added a commit that referenced this pull request Dec 1, 2017

Add test on EntryControllerTest for #3442
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>

@Kdecherf Kdecherf force-pushed the empty-entry branch from 2233c5d to 8e4a94f Dec 10, 2017

Kdecherf added a commit that referenced this pull request Dec 10, 2017

Add test on EntryControllerTest for #3442
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>

@Kdecherf Kdecherf requested review from j0k3r , nicosomb and tcitworld Dec 10, 2017

@@ -1429,4 +1430,55 @@ public function testRestrictedArticle()
$client->getContainer()->get('craue_config')->set('restricted_access', 0);
}
/**
* This test will require an internet connection.

This comment has been minimized.

@j0k3r

j0k3r Dec 11, 2017

Member

Are you sure?

This comment has been minimized.

@Kdecherf

Kdecherf Dec 11, 2017

Contributor

Nice one, will fix it

/**
* We generate a new client to be able to use Mock ContentProxy
* Also we reinject the cookie from the previous client to keep the
* session.

This comment has been minimized.

@j0k3r

j0k3r Dec 11, 2017

Member

Wow hard stuff 😯

@Kdecherf Kdecherf force-pushed the empty-entry branch from 8e4a94f to 7ab003a Dec 11, 2017

Kdecherf added a commit that referenced this pull request Dec 11, 2017

Add test on EntryControllerTest for #3442
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>

@Kdecherf Kdecherf added this to the 2.3.1 milestone Dec 11, 2017

@nicosomb

This comment has been minimized.

Copy link
Member

nicosomb commented Dec 12, 2017

Could you just edit CHANGELOG.md please? (new process ;-) )

@tcitworld
Copy link
Member

tcitworld left a comment

Code looks good

@Kdecherf Kdecherf self-assigned this Dec 13, 2017

Kdecherf added some commits Nov 26, 2017

Fix empty title and domain_name when exception is thrown during fetch
Add a new helper to set a default title when it's empty:
1/ use basename part of entry's path, if any
2/ or use domain name

Fixes #2053

Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
Add test on EntryControllerTest for #3442
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>

@Kdecherf Kdecherf dismissed stale reviews from tcitworld and nicosomb via d5d486f Dec 13, 2017

@Kdecherf Kdecherf force-pushed the empty-entry branch from 7ab003a to d5d486f Dec 13, 2017

Update CHANGELOG
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>

@Kdecherf Kdecherf force-pushed the empty-entry branch from d5d486f to b457d7b Dec 13, 2017

@j0k3r

j0k3r approved these changes Dec 14, 2017

@j0k3r j0k3r merged commit a68a80f into master Dec 14, 2017

5 checks passed

Scrutinizer 5 updated code elements
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
zappr/pr/specification PR has passed specification checks
zappr/pr/tasks PR has no open tasks.

@j0k3r j0k3r deleted the empty-entry branch Dec 14, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment