Admin setting to ignore minimum image height/width?

6 views
Skip to first unread message

Travis Huinker

unread,
Jun 8, 2017, 11:53:45 AM6/8/17
to Reason Discussion
I'm trying to upload some smaller logos and I'm getting the minimum height and width error for images. Is there anyway as an admin I can bypass this?

Matt Ryan

unread,
Jun 8, 2017, 1:41:08 PM6/8/17
to reason-discussion
As an admin you should see an "Ignore minimum size check" checkbox when you select an image to upload.

Are you not seeing that?

Matt

On Thu, Jun 8, 2017 at 10:53 AM, Travis Huinker <huin...@luther.edu> wrote:
I'm trying to upload some smaller logos and I'm getting the minimum height and width error for images. Is there anyway as an admin I can bypass this?

--
You received this message because you are subscribed to the Google Groups "Reason Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to reason-discussion+unsubscribe@googlegroups.com.
To post to this group, send email to reason-discussion@googlegroups.com.
Visit this group at https://groups.google.com/group/reason-discussion.
For more options, visit https://groups.google.com/d/optout.

Travis Huinker

unread,
Jun 8, 2017, 2:06:53 PM6/8/17
to Reason Discussion
I am not. Is this a setting we need to enable?


On Thursday, June 8, 2017 at 12:41:08 PM UTC-5, Matt Ryan wrote:
As an admin you should see an "Ignore minimum size check" checkbox when you select an image to upload.

Are you not seeing that?

Matt
On Thu, Jun 8, 2017 at 10:53 AM, Travis Huinker <huin...@luther.edu> wrote:
I'm trying to upload some smaller logos and I'm getting the minimum height and width error for images. Is there anyway as an admin I can bypass this?

--
You received this message because you are subscribed to the Google Groups "Reason Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to reason-discuss...@googlegroups.com.
To post to this group, send email to reason-d...@googlegroups.com.

Matt Ryan

unread,
Jun 8, 2017, 2:17:45 PM6/8/17
to reason-discussion
No, it's not controlled by a setting. If you are an admin you should see it.

I have a suspicion that the checkbox is there, but is hidden due to a bug introduced in the switch to a tableless admin interface in 4.7. There are a lot of bugfixes for issues like this in 4.8.

You can see the commit with the fix here:
https://github.com/reasoncms/reasoncms/commit/f44237a4eb56a217dfb1d8ca63a43aeb1873292a

Matt

To unsubscribe from this group and stop receiving emails from it, send an email to reason-discussion+unsubscribe@googlegroups.com.
To post to this group, send email to reason-discussion@googlegroups.com.

Travis Huinker

unread,
Jun 8, 2017, 3:43:37 PM6/8/17
to Reason Discussion
Would this bug still be here in 4.6? We haven't upgraded to 4.7 yet.

Travis Huinker

unread,
Jun 8, 2017, 3:45:18 PM6/8/17
to Reason Discussion
Inspecting the page's code I'm not seeing ignoreminimgsizecheckItem.

Matt Ryan

unread,
Jun 8, 2017, 3:52:42 PM6/8/17
to reason-discussion
I'm somewhat puzzled.

I seem to recall that this feature -- both adding a minimum size for image uploads and adding a checkbox to override this restriction -- was code that Luther contributed. The commit, from 2014, is here:

https://github.com/reasoncms/reasoncms/commit/c3f5e38582812a6f0a252dcd2e13f70921dca64b

I'm not sure who the github user "Timmah" is -- perhaps a Luther student employee? I know for sure that this feature was not added at Carleton, because we never turned it on :).

Matt

To unsubscribe from this group and stop receiving emails from it, send an email to reason-discussion+unsubscribe@googlegroups.com.
To post to this group, send email to reason-discussion@googlegroups.com.

Travis Huinker

unread,
Jun 8, 2017, 3:57:55 PM6/8/17
to Reason Discussion
Ok, I see what happened. We must have contributed it to the core, but in our local image.php3 file the feature wasn't included to ignore the size check. I put the code back in and it worked. Thanks Matt!

Matt Ryan

unread,
Jun 8, 2017, 4:47:33 PM6/8/17
to reason-discussion
FYI, it is best practice to use a local content manager with a different filename and class name than the core one, e.g. image_luther.php, which would define LutherImageManager as an extension of ImageManager. You can then specify the local, extended content manager on the image type in the master admin.

In your local content manager you then just do the necessary work, e.g. overloading a specific method or, better yet, doing something like:

function alter_data() {
    parent::alter_data();
    // your customizations
}

The big drawback of replacing a core file with a local one is that you don't get updates or changes, and you duplicate a bunch of code.

Matt

To unsubscribe from this group and stop receiving emails from it, send an email to reason-discussion+unsubscribe@googlegroups.com.
To post to this group, send email to reason-discussion@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages