MitsubaBBS / Mitsuba

Project Mitsuba - an opensource imageboard software written in PHP
http://mitsuba.cf/
Other
43 stars 20 forks source link

Cannot create post with embedded content or links #67

Closed ekem closed 10 years ago

ekem commented 10 years ago

When trying to make a post in an image board that is only embedded content, the attempt at a post results in "Error: No file selected." being displayed and no message being posted. Flagging no file allows the post to be made but of course no embedded content is included.

Trying to make the post with both an image file and embedded content returns a 'please select only one type'

I tried to make a link board and the same thing occurs. It won't recognize the url in the input box for the url. If you post with 'no file' it will post but ignore whatever is in the url input.

Desuneko commented 10 years ago

Issue confirmed. I'll try to fix it ASAP.

ekem commented 10 years ago

Thanks, I was going to work on it a bit tonight myself. I see that the post for the embed url is being posted, its just not being addded to the DB, i imagine its a problem with one of the validation if statements but thats as far as i got last night putting in var_dumps. It may be a simple error when the url is being parsed against the embed rules. Anyway if I find something ill shoot off an email

ekem commented 10 years ago

Seems the first error is that it checks for $bdata['embed'] instead of $bdata['embeds'] on line 218 imgboard.php . It will get you into the if statement for the embeds.The second error seems to be that checkEmbed is passed $_POST['embeds'] when it should be 'embed' - if you correct these errors you then get a return value of 500 as in 'internal server error' when you try and make a post. Seems it doesnt even make it into the checkEmbed function and just errors out with the html response 'Sorry'. I guess I could check the log. Or maybe i should rebuild the pages???? not sure mate - maybe you can take it from here.

ekem commented 10 years ago

I think its the implentation of namespaces, i finally got around to checking logs and... [:error] [pid 30561] [client __] PHP Fatal error: Call to undefined method Mitsuba::checkEmbed() in /home/ekem/public/____/public_html/imgboard.php on line 226, referer: http://_______/dmp/