Bonfire-News icon indicating copy to clipboard operation
Bonfire-News copied to clipboard

Bonfire 0.7 Support

Open jfox015 opened this issue 10 years ago • 19 comments

Update the module to work with Bonfire 0.7.

jfox015 avatar Jun 25 '14 19:06 jfox015

It's looking good, for the most part... except when I go to the news page, I'm getting an error about not being able to modify the headers. this may be in the core, I see a similiar message when I first install, but it always disapear after a refresh. not so with the new module. http://turtlewolf.info/news

A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /hermes/waloraweb035/b1597/moo.turtlewolf/assfire/bonfire/core/Loader.php:659)

Filename: libraries/Session.php

Line Number: 675

TurtleWolfe avatar Jun 28 '14 17:06 TurtleWolfe

Attachment Upload Directory "" is not write-able. I seem to be unable to set the upload directory correctly.

TurtleWolfe avatar Jun 28 '14 17:06 TurtleWolfe

When I go to http://turtlewolf.info/index.php/news or http://turtlewolf.info/news , it indicates I should sign in, eveb though technically I'm am still in the system and can toggle back into it easily.

TurtleWolfe avatar Jun 28 '14 17:06 TurtleWolfe

@TurtleWolf

1 Session headers - I see these sporadically sometimes across different CodeIgniter projects. It's a warning so it can be turned off by changing your environment variable in the sites "index.php" file to "staging" or "production".

2 Addressed this is the seperate bug

3 I'm not getting prompted to login visiting either link with or without a signed in account (I signed up on your site). The news should be publicly available with no specific permissions required and this looks to be working ok.

jfox015 avatar Jun 30 '14 13:06 jfox015

http://turtlewolf.info/news/article/1

If I go to this url, in the top right corner of the menu bar, it ask me to sign in... even if I've been signed in the whole time and I can click right back into the system without signing in, it's just bypassing the check to see if I am, and showing I should.

I'm stilling having trouble setting the upload directory...

I started working through a tutorial to do my own comments, but translating it to what I've learnt about bonfire,to see if I could help... but in the mean time I've added disqus and wonder if reinventing the wheel is just an educational exercise to better understand solving other problems.

TurtleWolfe avatar Jul 05 '14 15:07 TurtleWolfe

@TurtleWolf That login is built into the base Bonfire template which is what the News uses to show the basic news page. You could override that in the News controller. It shouldn't require a login to see news, but that might be there by default.

jfox015 avatar Jul 07 '14 15:07 jfox015

can you tell what I'm doing wrong with the upload directory...? I've had it working on previous installations.

TurtleWolfe avatar Jul 07 '14 17:07 TurtleWolfe

@TurtleWolf Can you send a screen grab of your setting to me at my email or give me access rights to the news admin area? Need to see what's going on to debug correctly. Thanks.

jfox015 avatar Jul 08 '14 03:07 jfox015

I will gladly give you admin access! It's still at http://turtlewolf.info/ , but it's a new install since the account you had last week, so you'd have to make a new account again, but as soon as I see it, I'll upgrade you to an admin again... I found an install of 6.1 and pointed to it to see, and it seemed to work with just having "nothing" saved in the form, so it was just uploading to the root directory, but that seems risky... I've also considered just hardcoding my destination into the code, but I've not found a good place to do that yet.

TurtleWolfe avatar Jul 08 '14 05:07 TurtleWolfe

screen shot 2014-07-08 at 5 53 43 pm

TurtleWolfe avatar Jul 08 '14 21:07 TurtleWolfe

@turtlewolf Don't post it here, but you need to get the path from the root of your host servers file path (not the Web url starting with http) and use that for the upload directory. It will be different from the Web url. An example of a typical server root path would be /usr/var/ht_docs/ then your public/uploads path.

jfox015 avatar Jul 08 '14 23:07 jfox015

ok, making progress... the images are showing up complete in the database as expected with duplicate thumbnails ending in _th, but on any pages they appear as a "broken" image tag. When I inspect it, the html code is what I'd expect it to be.

TurtleWolfe avatar Jul 09 '14 04:07 TurtleWolfe

@TurtleWolf I signed up again. Please give me admin access and I'll see if I can find an issue. So far 0.6 and 0.7 versions are working OK for me.

One question, is /public/ the web root of your site? If so, try removing it from the web url so that it's just uploads/ and see if that works to display it.

jfox015 avatar Jul 09 '14 14:07 jfox015

I just upgraded you to an admin. I also opened a ticket with my web host. Maybe they can help me see it.

TurtleWolfe avatar Jul 09 '14 16:07 TurtleWolfe

@TurtleWolf OK, I figured the public portion of the web URL wasn't required so I removed it in the News module settings and the image now shows in the news article. I closed the path bug here in Github for News as that does work OK in 0.6 and 0.7.

jfox015 avatar Jul 09 '14 18:07 jfox015

Thanks for everything! It's working great... one last thing, but it's not really an issue, so I'll just post it here. I'd like to limit the length of the preview articles on the homepage, before they click on "read more" to get the full text. I'm assuming that it would be some variation of $string = substr($string,0,100).'...'; but I'd like to avoid chopping any words into and I thought you' might have a "best practice" that's particular to this module, maybe a function I haven't found yet...

TurtleWolfe avatar Jul 10 '14 03:07 TurtleWolfe

@TurtleWolf I found the issue with the sign in link on the News page never picking up the users logged in state. It's actually a bug in the Bonfire library itself so I'll submit a bug report to them about it.

jfox015 avatar Jul 11 '14 18:07 jfox015

I thought I was ready to play around with the CSS... I started a new installation from scratch, but I've been getting the same installation error I got when I first attempted to use News 2.0 in a .7 version of Bonfire... I've tried .3, .4, master and development... I'm getting errors on all 3. I tried .3 most recently, expecting it to at least be stable... but I'm getting, A Database Error Occurred Error Number: 1064

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LEFT JOIN bf_news_categories ON bf_news_categories.id = bf_news_articles' at line 2

SELECT bf_news_articles.id, title, author, date, date_published, category_id, status_id, bf_news_articles.*, category LEFT JOIN bf_news_categories ON bf_news_categories.id = bf_news_articles.category_id LEFT JOIN bf_news_status ON bf_news_status.id = bf_news_articles.status_id WHERE bf_news_articles.deleted = 0 AND bf_news_articles.status_id = 3 AND bf_news_articles.deleted = 0 AND bf_news_articles.status_id = 3 AND bf_news_articles.deleted = 0 LIMIT 25

Filename: /hermes/waloraweb035/b1597/moo.turtlewolf/ace/bonfire/core/BF_Model.php

Line Number: 383

TurtleWolfe avatar Jul 13 '14 22:07 TurtleWolfe

@TurtleWolf You can't cross the streams my friend. News v0.3 (Master Branch) only works with Bonfire 0.6. News v0.4 (Development) only works with 0.7. I'm not back porting any 0.7 compatibility to 0.3.

jfox015 avatar Jul 14 '14 03:07 jfox015