• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
  • This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Member Map

If I comment out this function, the map loads, but empty...
model/ViewMap.php
PHP:
    public function formatMarkersForOutput( array $markers )
    {
        $this->userFollowing = $this->getModelFromCache( 'XenForo_Model_User' )->getFollowedUserProfiles( XenForo_Visitor::getUserId() );

        foreach( $markers as $marker )
        {
            $this->addMarkerToArray( $marker );
        }

        /* Sort markers */
        ksort( $this->finalMarkers );

        return XenForo_ViewRenderer_Json::jsonEncodeForOutput( $this->finalMarkers );
    }
hope this helps
 

SheepCow

Well-known member
It does indeed, change it to:

PHP:
    public function formatMarkersForOutput( array $markers )
    {
        $this->userFollowing = $this->getModelFromCache( 'XenForo_Model_User' )->getFollowedUserProfiles( XenForo_Visitor::getUserId() );

        foreach( $markers as $marker )
        {
            $this->addMarkerToArray( $marker );
        }

        /* Sort markers */
        ksort( $this->finalMarkers );

        return XenForo_ViewRenderer_Json::jsonEncodeForOutput( $this->finalMarkers, false );
    }
The only change is ", false" on the end of the last line. It stops XF adding some of it's parameters to the JSON which was confusing the member map.
 

Marc

Well-known member
It does indeed, change it to:

PHP:
    public function formatMarkersForOutput( array $markers )
    {
        $this->userFollowing = $this->getModelFromCache( 'XenForo_Model_User' )->getFollowedUserProfiles( XenForo_Visitor::getUserId() );

        foreach( $markers as $marker )
        {
            $this->addMarkerToArray( $marker );
        }

        /* Sort markers */
        ksort( $this->finalMarkers );

        return XenForo_ViewRenderer_Json::jsonEncodeForOutput( $this->finalMarkers, false );
    }
The only change is ", false" on the end of the last line. It stops XF adding some of it's parameters to the JSON which was confusing the member map.
Was just gonna look at this too ... Saved me a job :) .. Cheers m8
 
Sorry for my lack of activity, guys :(

Been swamped with IPB work, custom jobs, and other personal stuff lately, and haven't even looked at XF 1.1 due to that. Will get it installed as soon as I can, and check that the fix from SheepCow (Thank you for that, btw!) is all that's needed to make it 1.1 compatible.
 

Marc

Well-known member
Sorry for my lack of activity, guys :(

Been swamped with IPB work, custom jobs, and other personal stuff lately, and haven't even looked at XF 1.1 due to that. Will get it installed as soon as I can, and check that the fix from SheepCow (Thank you for that, btw!) is all that's needed to make it 1.1 compatible.
From what I have tested, this certainly seems to be the case m8
 
strange problem with member map.
I didn't change anything and today there's an error:

Server Error

json_encode() [function.json-encode]: Invalid UTF-8 sequence in argument
  1. XenForo_Application::handlePhpError()
  2. json_encode() in XenForo/ViewRenderer/Json.php at line 179
  3. XenForo_ViewRenderer_Json::jsonEncodeForOutput() in memberMap/Model/ViewMap.php at line 81
  4. memberMap_Model_ViewMap->formatMarkersForOutput() in memberMap/Model/ViewMap.php at line 48
  5. memberMap_Model_ViewMap->getMarkers() in memberMap/ControllerPublic/MemberMap.php at line 27
  6. memberMap_ControllerPublic_MemberMap->actionIndex() in Dark/TaigaChat/ControllerPublic/Index.php at line 8
  7. Dark_TaigaChat_ControllerPublic_Index->actionIndex() in XenForo/FrontController.php at line 310
  8. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
  9. XenForo_FrontController->run() in /home/alterproject/ftp/AKYSZ/index.php at line 13
what should I do? :confused:
 
strange problem with member map.
I didn't change anything and today there's an error:

Server Error

json_encode() [function.json-encode]: Invalid UTF-8 sequence in argument
  1. XenForo_Application::handlePhpError()
  2. json_encode() in XenForo/ViewRenderer/Json.php at line 179
  3. XenForo_ViewRenderer_Json::jsonEncodeForOutput() in memberMap/Model/ViewMap.php at line 81
  4. memberMap_Model_ViewMap->formatMarkersForOutput() in memberMap/Model/ViewMap.php at line 48
  5. memberMap_Model_ViewMap->getMarkers() in memberMap/ControllerPublic/MemberMap.php at line 27
  6. memberMap_ControllerPublic_MemberMap->actionIndex() in Dark/TaigaChat/ControllerPublic/Index.php at line 8
  7. Dark_TaigaChat_ControllerPublic_Index->actionIndex() in XenForo/FrontController.php at line 310
  8. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
  9. XenForo_FrontController->run() in /home/alterproject/ftp/AKYSZ/index.php at line 13
what should I do? :confused:
help!
I reinstalled new version and still the same error.
 
so, what should I check?
I'm not familiar with that error information. I'm not wiseman with html :confused:
Disable all addons and go with the default xenforo theme.
If it works, you can check it with your own theme if you have one. Enable other addons one by one.
Let Member Map active during this test of course... have you edited a document? or have you done the fix above by yourself?
 
I fixed Member Map after upgrading to newest Xenforo version and it was all OK.

Today I disabled all addons and the only change was , error
6. memberMap_ControllerPublic_MemberMap->actionIndex() in Dark/TaigaChat/ControllerPublic/Index.php at line 8
dissapeared


I reinstalled shoutbox and Member Pap too, and installed them again, but still the same situation.
shoutbox works perfectly, but Member Map's page shows:
Server Error

json_encode() [function.json-encode]: Invalid UTF-8 sequence in argument
  1. XenForo_Application::handlePhpError()
  2. json_encode() in XenForo/ViewRenderer/Json.php at line 179
  3. XenForo_ViewRenderer_Json::jsonEncodeForOutput() in memberMap/Model/ViewMap.php at line 81
  4. memberMap_Model_ViewMap->formatMarkersForOutput() in memberMap/Model/ViewMap.php at line 48
  5. memberMap_Model_ViewMap->getMarkers() in memberMap/ControllerPublic/MemberMap.php at line 27
  6. memberMap_ControllerPublic_MemberMap->actionIndex() in Dark/TaigaChat/ControllerPublic/Index.php at line 8
  7. Dark_TaigaChat_ControllerPublic_Index->actionIndex() in XenForo/FrontController.php at line 310
  8. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
  9. XenForo_FrontController->run() in /home/alterproject/ftp/AKYSZ/index.php at line 13