6

I've just set up a new testing environment and a brand new copy if EE 2.8 for testing new Add-Ons. After installing the latest MX Title Control (2.8.4) i can't seem to get it to work.

I've never had any problems with MX Title Control with older versions of EE.

Anyone experiencing the same problem?

  • I'm also noticing that MX Title Control 2.8.4 is not working in ExpressionEngine 2.8.1. Would be great if the developer issued a fix for this. – Stephen Apr 28 '14 at 11:48
5

The awesome Eric Lamb helped me track down the fix for this problem. It isn't related to the CP URL change. It's a problem in the addon file.

Change line 326 from:

$out = '//  THIS IS TEST'; 

to this:

$out = '';
| improve this answer | |
  • 1
    This fix worked for me using MXTC 2.9.0 and EE 2.9.0 – Paul Frost Sep 20 '14 at 8:54
  • 1
    oh... so silly from my side :( In my local repository I don't have this line, and all other lines is the same. It is why MXTC works fine on my installs and clients... My apology for everyone. – Max Lazar Sep 23 '14 at 10:54
2

I was able to fix the plugin by updating the ext.mx_title_control.php file on line 333 and 338. I replaced the following code:

element('channel_id', $get)

with

element('/cp/content_publish/entry_form?channel_id', $get)

| improve this answer | |
  • Thanks for posting this. Have you sent this fix to Max Lazar? He may incorporate it into his code to get a fixed version out there. – Jeremy Gimbel May 23 '14 at 17:09
  • I did as suggested, but strangely it didn't work for me. I'm using MXTC 2.9.0 on EE 2.8.1 at the moment. Tried deactivating Zenbu but didn't help either. – David Lang Jun 1 '14 at 14:21
  • This fix worked for me – CreateSean Jun 5 '14 at 17:53
  • Didn't work for me either with MXTC 2.9.0 on EE 2.8.1 – Anna_MediaGirl Aug 20 '14 at 18:02
1

There are a lot of Javascript related issues surfacing with 2.8, and I believe MX Title Control is highly JS-dependent, so this isn't surprising.

You might try applying the patch posted on this Bug Tracker: https://support.ellislab.com/bugs/detail/20165

| improve this answer | |
  • Thanks for the hint, sadly it didn't help. I believe a fix from the developer is required. – David Lang Mar 4 '14 at 23:38
  • yes and no - the most important, that they change they URL's structure. before: &D=cp&C=content_publish& after:/cp/content_publish/entry_form; it is broke trick with HTTP_REFERER for cp_js_end – Max Lazar Mar 16 '14 at 7:25
  • @MaxLazar Can MX Title Control not be fixed to work with 2.8.1? – Anna_MediaGirl Aug 20 '14 at 17:49
1

This thread is a few months old, but the solutions provided so far have not worked for me. Until MX Title Control is updated for 2.8.1 (it still isn't as of posting), a simple fix to modify the "Title" and "URL Title" labels is to simply add some JS within the "instructions" field of any field within that channel's field group:

<script>// We're using this field's instructions to hijack labels via JS at DOM-ready
$(function() {

    // Make sure that this is the publish form (just for a level of safety)
    if (!EE.publish) return;
    // Set your channel's field group here (just another level of safety)
    if (EE.publish.field_group == 4) {

        // "Title" Label
        var titleLabel = $("#sub_hold_field_title").prev("label")
        var titleMarkup = titleLabel.html();
        titleLabel.html(titleMarkup.replace('Title','Custom Title'));

        // "URL Title" Label
        var URLTitleLabel = $("#sub_hold_field_url_title").prev("label")
        var URLTitleMarkup = URLTitleLabel.html();
        URLTitleLabel.html(URLTitleMarkup.replace('URL Title','Custom URL Title'));

    } else return;
});</script>

It's less than elegant, but it works for now.

| improve this answer | |
0

In case anyone else stumbles on this looking for an answer, when upgrading isn't possible, change line 328:

parse_str(parse_url(@$_SERVER['HTTP_REFERER'], PHP_URL_QUERY), $get);

to

parse_str(parse_url(parse_url(@$_SERVER['HTTP_REFERER'], PHP_URL_QUERY), PHP_URL_QUERY), $get);

The URLs in 2.8 add an additional "?" to the query string (e.g. "/system/index.php?/cp/content_publish/entry_form?channel_id=22") because of this the parse_url function doesn't properly parse the URL and thus creates issues for the rest of the cp_js_end function.

Also worth noting is that line 432 should also be updated to work with the new input field format (i.e. the removal of the ID attribute).

change line 432 from:

$out .= '$("#title").attr("maxlength", "'.$max_title.'");';

to

$out .= '$("[name=\'title\']").attr("maxlength", "'.$max_title.'");';
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.