Adult Script Pro Community Forums

The forum is here for legacy reasons. No new posts will be created. User registration is disabled! If you have any questions, please email us or check https://www.adultscriptpro.com for more details!

You are not logged in.

#1 2015-02-16 16:20:09

quirkmedia
Member
From: Brampton,Ontario,Canada
Registered: 2012-05-21
Posts: 128
Website

[FIXED 2.0.6] Error reassigning channel

Hi
I recently uploaded some videos under the wrong channel. When I went  in to edit the video and correct the channel I got an error message...


UPDATE aspchannel SET total_videos = total_videos+1, last_add_time = 1424103698 WHERE channel_id = 15 LIMIT 11
Query: UPDATE aspchannel SET total_videos = total_videos-1 WHERE channel_id = 14 LIMIT 1
Error Message: BIGINT UNSIGNED value is out of range in '(`hdfet_asps`.`aspchannel`.`total_videos` - 1)'
Error Number: 1690

I got the error when trying to bulk edit all affected videos plus also when I tried to change channel on each individual video as well

Offline

#2 2015-02-16 16:35:27

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: [FIXED 2.0.6] Error reassigning channel

Edit admin/modules/video/components/edit.php and change:

                            $this->db->query("UPDATE #__channel
                                              SET total_videos = total_videos-1
                                              WHERE channel_id = ".$o_channel_id."
                                              LIMIT 1");

with:

                            $this->db->query("UPDATE #__channel
                                              SET total_videos = CASE WHEN total_videos > 0 THEN total_videos-1 ELSE 0 END
                                              WHERE channel_id = ".$o_channel_id."
                                              LIMIT 1");

Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#3 2015-02-16 17:02:04

quirkmedia
Member
From: Brampton,Ontario,Canada
Registered: 2012-05-21
Posts: 128
Website

Re: [FIXED 2.0.6] Error reassigning channel

Didn't change anything unfortunately. However I noticed that when doing change individually it gives error but when refeshing video the channel has changed
l

Offline

#4 2015-02-17 07:27:41

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: [FIXED 2.0.6] Error reassigning channel

There are 2 occurences of the above code. Did you replace them both?


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

Board footer

Powered by FluxBB