Profile Status Page cutting off the image

Hello, I recently tried to implement Profile Status Page by Yep . It works fine except the text is cutting off the character profile image. Did anyone else stumble upon this issue?
Here is a picture of how it looks.
Spoiler
tb4kEyf.jpg
Or better yet has anyone been able to solve this?
Here made you this fix. It should be noted that this should be placed immediatly after YEP_X_ProfileStatusPage and BEFORE any other plugin that requires YEP_StatusMenuCore.

The problem was because the image was drawn first and then the text, and when the text was drawn it made a call to clearItem which would also clear part of the image. The fix is by drawing the text first and then the image. I tried to do it the best I could without drawing the same thing multiple times, however it comes with the downside that you have to place it as described above to not run into any potential compatibility issues.

If you run in to any issues with this plugin feel free to message me 🙂

Code:
//=============================================================================
// Yanfly Profile Status Page Fix
// MRP_YEP_X_ProfileStatusPage_Fix.js
// By Magnus0808 || Magnus Rubin Peterson
//=============================================================================

/*:
 * @plugindesc Requires YEP_X_ProfileStatusPage.js (v. 1.03) : Fixes Images
 * @author Magnus0808
 *
 * @help Requires YEP_X_ProfileStatusPage.js(v. 1.03) and YEP_StatusMenuCore (v. 1.04).
 * Should be places immediately after YEP_X_ProfileStatusPage and BEFORE any other
 * plugin that requires YEP_StatusMenuCore
 *
 * The problem this plugin fixes is that text cut of profile image. The "bug" occures
 * because the base drawItem of Window_StatusInfo calls clearItem. It does this to
 * clear out any old text, however this also clears out part of the image. This
 * could be fixed by drawing the image AFTER you have drawn the text.
 *
 * This plugin makes a work around it. However, this is NOT the optimal solution,
 * which to my knowledge can only be done properly by editing YEP_X_ProfileStatusPage
 * directly.
 *
 * This plugin does NOT have automatic linebreaks, so if your lines are too long
 * then you will write over the image.
 */
 
(function() {
    // Rearranged so draw image is after draw items.
    // I have done it like this so it does not have to draw the same image multiple times.
    Window_StatusInfo.prototype.drawAllItems = function() {     
        // From YEP_X_ProfileStatusPage
        if (this._symbol === 'profile' && this._actor) {
          if (this._actor.profileImage() !== '') {
            var bitmap = ImageManager.loadPicture(this._actor.profileImage());
            if (bitmap.width <= 0) {
              return setTimeout(this.drawAllItems.bind(this), 5);
            }
            this.drawAllTextItems();
            this.drawProfileImage();
          }
          else
          {
            this.drawAllTextItems();
          }
        } else {
            this.drawAllTextItems();
        }
      
    };
  
    Window_StatusInfo.prototype.drawAllTextItems = function() {
        // From YEP_StatusMenuCore (drawAllItems)
        var topIndex = this.topIndex();
        for (var i = 0; i < this.maxPageItems(); i++) {
            var index = topIndex + i;
            if (index < this.maxItems()) {
                this.drawItem(index);
            }
        }
    } 
})();
Sorry for not replying sooner. I assumed that after nobody reacted to the thread it was a lost cause.

Anyway thank you. This solved the problem completely and everything now works as should. I cannot thank you enough for this.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/profile-status-page-cutting-off-the-image.107034/