How to change subject line character max length?

Eldi

Member
I am trying to change subject line character limit from 500 to some higher number.
Anyone know the file path?
Thank you
 
You'll also need to modify the database table(mw_campaign) to allow more than the default.
Have the same problem. Could you please share ss where is that table are located and what I need to change there?
Thanks in advance!

updt. the table is called campaign (possibly with the mw_prefix), and the column is again, subject.
 
Last edited:
Yes, I found it and already updated my post upthere.

But anyway thanks a lot, I think this ss might be useful for others.
 
is there a way to do this via extension? My understanding is that next time mailwizz receives an update, whatever was set in
Code:
/apps/common/models/Campaign.php
will get overridden by the latest code
 
In v2.5.7 we have added a hook called "listfieldvalue_model_value_max_length".
So after you modify that column manually, to whatever length you want, say 512, you then use this hook:
PHP:
<?php

hooks()->addFilter('listfieldvalue_model_value_max_length', function($length){
    return 512;
})
And this way you should be safe for upgrades.

Please note this is a new hook, and there might be areas were we'd need to make use of it, but it should work just fine for most cases.
And again, you need to modify your database manually before.
 
Back
Top