# Help! Fatal Error after enabling live link in 6.1.4 Beta 5520

**URL:** <https://community.localwp.com/t/help-fatal-error-after-enabling-live-link-in-6-1-4-beta-5520/28124>\
**Category:** Support\
**Tags:** live-links\
**Created:** [October 6, 2021, 9:31pm UTC](https://community.localwp.com/t/help-fatal-error-after-enabling-live-link-in-6-1-4-beta-5520/28124 "2021-10-06T21:31:26Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![MSDesign](https://avatars.discourse-cdn.com/v4/letter/m/7cd45c/32.png) [@MSDesign](https://community.localwp.com/u/MSDesign)\
**Post date:** [October 6, 2021, 9:31pm UTC](https://community.localwp.com/t/help-fatal-error-after-enabling-live-link-in-6-1-4-beta-5520/28124/1 "2021-10-06T21:31:26Z")

</div>

After live link wouldn’t work in the normal Local, I downloaded the Beta version and imported my site. But when I tried to access the live link from my phone, everything crashed. It was a Fatal Error message with a big chart but I didn’t catch the screenshot before it changed. Now when I try to access my site, whether from Local or Local Beta, I get this message:

( ! ) Fatal error: Uncaught TypeError: Cannot access offset of type string on string in C:\Users\stomp\Local Beta Sites\asheville-baptist-institute\app\public\wp-includes\class-wp-roles.php on line 290

 ![image](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/2X/6/69bc6e78355834ab0c700de515d5c209831c6884.png)

This is the section in the php file:

/\*\*

```
 * Initializes all of the available roles.
 *
 * @since 4.9.0
 */
public function init_roles() {
    if ( empty( $this->roles ) ) {
        return;
    }
    $this->role_objects = array();
    $this->role_names = array();
    foreach ( array_keys( $this->roles ) as $role ) {

```

_ **Line 290** :_\* $this-\>role\_objects[$role] = new WP\_Role( $role, $this-\>roles[$role][‘capabilities’] );

```
        $this->role_names[$role] = $this->roles[$role]['name'];
    }

```

Local Log attached  
[local-lightning.log](https://community.localwp.com/uploads/short-url/mBdbveWZ70EsMXuOZvEGFurcZMb.log) (129.4 KB)

Any suggestions highly appreciated!!

---

<div class="post-metadata">

**Author:** ![afragen](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/afragen/32/31_2.png) [@afragen](https://community.localwp.com/u/afragen)\
**Post date:** [October 6, 2021, 9:33pm UTC](https://community.localwp.com/t/help-fatal-error-after-enabling-live-link-in-6-1-4-beta-5520/28124/2 "2021-10-06T21:33:19Z")

</div>

> [@In wp-admin using live-link shows error](http://community.localwp.com/t/in-wp-admin-using-live-link-shows-error/26169/2):
>
> In the mu-plugins/local-by-flywheel-live-link-helper.php add the following code to function make\_link\_local() add before the return. if ( is\_object($str)){ return; } A better fix is to open up the package contents of the Local app and fix this but that can be dangerous. @ben.turner perhaps a 6.0.1 is in order.

---

<div class="post-metadata">

**Author:** ![MSDesign](https://avatars.discourse-cdn.com/v4/letter/m/7cd45c/32.png) [@MSDesign](https://community.localwp.com/u/MSDesign)\
**Post date:** [October 6, 2021, 9:45pm UTC](https://community.localwp.com/t/help-fatal-error-after-enabling-live-link-in-6-1-4-beta-5520/28124/3 "2021-10-06T21:45:12Z")

</div>

I tried it, but the mu-plugins folder is showing as empty?

---

<div class="post-metadata">

**Author:** ![afragen](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/afragen/32/31_2.png) [@afragen](https://community.localwp.com/u/afragen)\
**Post date:** [October 6, 2021, 9:58pm UTC](https://community.localwp.com/t/help-fatal-error-after-enabling-live-link-in-6-1-4-beta-5520/28124/4 "2021-10-06T21:58:43Z")

</div>

Do you have a stack trace for this error?

Please excuse my previous reply. That’s a different issue.

---

<div class="post-metadata">

**Author:** ![MSDesign](https://avatars.discourse-cdn.com/v4/letter/m/7cd45c/32.png) [@MSDesign](https://community.localwp.com/u/MSDesign)\
**Post date:** [October 6, 2021, 9:59pm UTC](https://community.localwp.com/t/help-fatal-error-after-enabling-live-link-in-6-1-4-beta-5520/28124/5 "2021-10-06T21:59:59Z")

</div>

What is a stack trace?

---

<div class="post-metadata">

**Author:** ![afragen](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/afragen/32/31_2.png) [@afragen](https://community.localwp.com/u/afragen)\
**Post date:** [October 6, 2021, 10:02pm UTC](https://community.localwp.com/t/help-fatal-error-after-enabling-live-link-in-6-1-4-beta-5520/28124/6 "2021-10-06T22:02:07Z")

</div>

If you set `define( WP_DEBUG, true );` in the wp-config.php file, when the error happens you will see a stack trace of the error.

Essentially it’s the sequence of calls leading to the error.

---

<div class="post-metadata">

**Author:** ![MSDesign](https://avatars.discourse-cdn.com/v4/letter/m/7cd45c/32.png) [@MSDesign](https://community.localwp.com/u/MSDesign)\
**Post date:** [October 6, 2021, 10:05pm UTC](https://community.localwp.com/t/help-fatal-error-after-enabling-live-link-in-6-1-4-beta-5520/28124/7 "2021-10-06T22:05:19Z")

</div>

Thanks. Actually, I’d seen the mu-plugins fix in another thread and couldn’t find the file. After you commented here, I tried again (same folder) and suddenly it was there. I added your code, and the site worked. Then I enabled the live link again, and the site crashed again, and the mu-plugin file disappeared again. I still can’t see it (or the site). But this time I got a screenshot - is it the call stack you asked for?

 ![Screenshot_20211006-164024](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/2X/7/75f408ecc0a7f81bb04463e4b89cc3c9fa2cf2de.png)

---

<div class="post-metadata">

**Author:** ![afragen](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/afragen/32/31_2.png) [@afragen](https://community.localwp.com/u/afragen)\
**Post date:** [October 6, 2021, 10:19pm UTC](https://community.localwp.com/t/help-fatal-error-after-enabling-live-link-in-6-1-4-beta-5520/28124/8 "2021-10-06T22:19:35Z")

</div>

That stack trace actually points back to the link I referenced.

I think every time you disable/enable live links the original file that needs the fix is installed. So the error recurs even though you fixed it once.

---

<div class="post-metadata">

**Author:** ![afragen](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/afragen/32/31_2.png) [@afragen](https://community.localwp.com/u/afragen)\
**Post date:** [October 6, 2021, 10:35pm UTC](https://community.localwp.com/t/help-fatal-error-after-enabling-live-link-in-6-1-4-beta-5520/28124/9 "2021-10-06T22:35:40Z")

</div>

The file has changed a bit and the new fix is adding the following to line 155 in `replace_host()`

```
if ( is_object( $subject ) ) {
    return;
}
```

---

<div class="post-metadata">

**Author:** ![MSDesign](https://avatars.discourse-cdn.com/v4/letter/m/7cd45c/32.png) [@MSDesign](https://community.localwp.com/u/MSDesign)\
**Post date:** [October 7, 2021, 4:44pm UTC](https://community.localwp.com/t/help-fatal-error-after-enabling-live-link-in-6-1-4-beta-5520/28124/10 "2021-10-07T16:44:57Z")

</div>

I was unable to find the mu-plugins php file, the folder was empty :-/ I’m back up and running though - I exported\* my site and then reinstalled Local (after completely deleting all of its files) and imported the site. Had trouble importing it because it’d get stuck on “starting site services” but solved this by first adding two new sites (to fix hosts permission issue) and then imported my site without a hitch.

\*Note: I’d exported my site prior to crashing it with the live-link, so I’m not sure this “fix” would work if exporting site afterwards

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/system/32/1_2.png) [@system](https://community.localwp.com/u/system)\
**Post date:** [October 9, 2021, 4:45am UTC](https://community.localwp.com/t/help-fatal-error-after-enabling-live-link-in-6-1-4-beta-5520/28124/11 "2021-10-09T04:45:00Z")

</div>

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.
