Skip to content
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

Bug: Documentation news app project #3054

Closed
tobecci opened this issue Jun 1, 2020 · 4 comments
Closed

Bug: Documentation news app project #3054

tobecci opened this issue Jun 1, 2020 · 4 comments
Labels
bug Verified issues on the current code behavior or pull requests that will fix them

Comments

@tobecci
Copy link

tobecci commented Jun 1, 2020

Describe the bug
the news/slug page in the documentation project fails to load

CodeIgniter 4 version
4.0.3

Affected module(s)
the overview view

Expected behavior, and steps to reproduce if appropriate
when you visit the news page it loads the overview view listing the news items in the database along with a link redirecting to News::view/$1 route which displays the single news item.
but it does not show the page.
the reason lies in the view

 <p><a href="/news/<?= esc($news_item['slug'], 'url'); ?>">View article</a></p>

should instead be

 <p><a href="news/<?= esc($news_item['slug'], 'url'); ?>">View article</a></p>

Context

  • Web server xampp 3.2.4
  • PHP version 7.4.4
@tobecci tobecci added the bug Verified issues on the current code behavior or pull requests that will fix them label Jun 1, 2020
@dafriend
Copy link
Contributor

dafriend commented Jun 3, 2020

I cannot reproduce the problem. In fact, the correct news/slug page loads with or without your proposed fix.

@jreklund
Copy link
Contributor

jreklund commented Jun 4, 2020

That example are based off a real domain. It won't work in subfolders.
http://localhost/codeigniter4/public/news

You should create a virtual host named e.g. example.com
http://example.com/news

Or using php spark serve as stated in Getting Up and Running.
http://localhost:8080/news

@tobecci
Copy link
Author

tobecci commented Jun 5, 2020

okay, i tried it and it's working on localhost:8080 served by spark

@tobecci
Copy link
Author

tobecci commented Jun 5, 2020

I cannot reproduce the problem. In fact, the correct news/slug page loads with or without your proposed fix.

are you serving the project on xampp?

@tobecci tobecci closed this as completed Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified issues on the current code behavior or pull requests that will fix them
Projects
None yet
Development

No branches or pull requests

3 participants