WebsiteBaker Support (2.12.x) > Modules

OneForAll - Set image to inactive won't save

(1/3) > >>

CodeALot:
OneForAll 2.0.2.23


* Go into modify_item.php  and set one or more images to "Active: NO"
* Save
* Go back into the item.
* Images are all set to "Active: YES"  :| :|

* Go into the database.
* Find table mod_oneforall_image s
* Set an image to "Active: 0"
* Go back into modify_item.php of the item that you just set an image inactive for
* You'll see that the image you set to inactive in the database, is now indeed inactive.
* Click the checkbox to make it Active again.
* Save the item.
* Go back
* The image is now Active again.
So, I can't set an image to INactive, but I CAN set it to Active.
 
What's wrong here? It did work as expected in earlier versions.

(Sorry, this should have gone into a different forum board: WebsiteBaker 2.12.2 --> Modules)

Gast:
works for me

the only point, what i see:  go into save_item.php  ~ Line 491

and add here the integer-specification  (int) to the $image[active] like this


--- Code: ---    // Update image data
    $database->query('UPDATE `'.TABLE_PREFIX.'mod_'.$mod_name.'_images` '
                    .'SET   `active` = '.(int)$image['active'].', '
                    .'         `alt` = \''.$image['alt'].'\', '
                    .'       `title` = \''.$image['title'].'\', '
                    .'     `caption` = \''.$image['caption'].'\' '
                    .'WHERE `img_id` = '.(int)$img_id.' ');
--- End code ---

dbs:
With or without (int) it works for me also not.

CodeALot:
Unfortunately, that did not do the trick for me :(
Thanks for your reply, though :)

CodeALot:

--- Quote from: dbs on July 11, 2019, 11:20:56 AM ---With or without (int) it works for me also not.

--- End quote ---
You mean you have the same problem?

Navigation

[0] Message Index

[#] Next page

Go to full version