XoopsModules25x / news

With this XOOPS module, you can create an unlimited number of news on your site. You can create all the articles you want and attach them to topics.
4 stars 11 forks source link

hostname column not intended for IPv6 #24

Closed montuy337513 closed 2 years ago

montuy337513 commented 2 years ago

I have this message when I want to insert an article. IPv6 does not pass.

0,002242 - INSERT INTO news_stories (storyid, uid, title, created, published, expired, hostname, nohtml, nosmiley, hometext, bodytext, counter, topicid, ihome, notifypub, story_type, topicdisplay, topicalign, comments, rating, votes, description, keywords, picture, pictureinfo, subtitle) VALUES (0, 1, 'qsfqsfqsfqsf', 1638386484, 1638386483, 0, '2a02:8440:6240:803:1cb1:301e:9428:1278', 0, 0, '

qsfqsfqsf

', '

qsfqsfqsf

', 0, 2, 0, 1, 'admin', 0, 'R', 0, 0, 0, '', '', '', '', '') Error number: 1406 Error message: Data too long for column 'hostname' at row 1

I manually enlarged the size of my column by putting a varchar (65) But for the next version, we will have to think about enlarging the hostname column in upgrade.php

mambax7 commented 2 years ago

As as standard for IP, we use VARCHAR(45), as we do, for example, in Newbb I'll make the change for the next update for News. Thanks for reporting it!

mambax7 commented 2 years ago

Addressed in https://github.com/XoopsModules25x/news/pull/27 Please check if it works for you, if not, please re-open. Please note: News is not actively maintained anymore. Please use Publisher