Wait! Looks like we don't have enough information to add this to bug database. Please follow this template bug format.
  1. #1
    Sencha Premium Member Rakotoseheno's Avatar
    Join Date
    Jun 2010
    Location
    France
    Posts
    4
    Vote Rating
    0
    Rakotoseheno is on a distinguished road

      0  

    Default I can't load my archive project !

    I can't load my archive project !


    Hi all,


    My arcitect just update to version 2.1.0 Build: 676.
    After updating, I can not load my archived project!


    It displays a message:
    TypeError: 'undefined' is not a function (Evaluating 'page.substr (0, 4)')


    it offers 3 actions: ignore, restart exit age architect.


    I just saved the file (metadata + file.xds) in my svn.


    Currently, I have no sources!


    I wanted to know if anyone has had this kind of problem.


    How to solve this problem!


    Linx
    Attached Images
    L'imagination est plus fort que la connaissance (A.E)

  2. #2
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,413
    Vote Rating
    129
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Could you send us a zip of the project prior to the error? (architect.feedback at sencha.com)

    We can see what's happening. That error looks like it was trying to build a url out of the base url prefix and failing. What is the url prefix set to?
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  3. #3
    Sencha Premium Member Rakotoseheno's Avatar
    Join Date
    Jun 2010
    Location
    France
    Posts
    4
    Vote Rating
    0
    Rakotoseheno is on a distinguished road

      0  

    Default


    Aconran,

    thank you for your help, I still find my way because I can not send you the source code.
    In meantime, i continue with my text editor waiting to find a solution.
    L'imagination est plus fort que la connaissance (A.E)

  4. #4
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,413
    Vote Rating
    129
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    From a second look at the code it looks like you might have a number or boolean in your url configuration for one of your stores.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  5. #5
    Sencha Premium Member Rakotoseheno's Avatar
    Join Date
    Jun 2010
    Location
    France
    Posts
    4
    Vote Rating
    0
    Rakotoseheno is on a distinguished road

      0  

    Default


    Hi Aconran,


    In fact, all my url is created dynamicly to manage routing.
    To do this:
    - I defined a property usingRouting=true for url dynamic
    - I use FOS JS which calls Symfony route.
    - I implemented the code below :


    Code:
    // APPEL ////////////////////////////////////////////////////////////////////////////////////
       proxy: {
          type: 'ajax',
          usingRouting: true,
          api: {
             read: {
                name: 'personne_documentsReglementairesDetails',
                buidFromParams: false,
                useFilter: true,
                params: {
                   _format: 'json'
                }
             },
             create: undefined,
             update: undefined,
             destroy: undefined
          },
          reader: {
             type: 'json',
             idProperty: 'numLigne',
             root: 'documentReglementairesDetail'
          }
       }
    Code:
    ////////////////////////////////////////////////////////////////////////////////////
    // PROXY POUR GERER LE FOS JS ROUTING
    // Surcharge le proxy pour tenir compte de FOS JS Routing
    // On cherche à introduire des paramètres dans la propriété 'api' du proxy
    //   afin de fournir les arguments d'appel de la méthode Routing.generate()
    Ext.define('Pegase.ProxyServerOverride', {
        override: 'Ext.data.proxy.Server',
       
        getUrl: function(aRequest)
        {
            if( this.usingRouting )
            {
                var iUrlDesc= this.api[aRequest.action];
                
                if( Ext.isObject(iUrlDesc) )
                {
                    var iDataParams= Ext.apply({}, aRequest.params);
                    var iQueryParams= iDataParams;
                    
                    if( iUrlDesc.useFilter )
                    {
                        iQueryParams= {};
                        Ext.each(aRequest.operation.filters, function(aFilter)
                        {
                            this[aFilter.property]= aFilter.value;
                        }, iQueryParams);
                    }
    
    
                    var iUrlParams= Ext.apply({}, iUrlDesc.params, iQueryParams);
                                   
                    if( iUrlDesc.useRecord )
                    {
                        Ext.applyIf(iUrlParams, aRequest.operation.records[0].data);
                    }
                    
                    Ext.Object.each(iUrlDesc.mapping || {}, function(aQueryParamName, aDataParamName)
                    {
                        this[aQueryParamName]= iDataParams[aDataParamName];
                    }, iUrlParams);
                    
                    return Routing.generate(iUrlDesc.name, iUrlParams);
                }
            }
            
            return this.callParent(arguments);
        },
        
        constructor: function()
        {
            this.callParent(arguments);
            
            if( this.usingRouting )
            {
                Ext.Object.each(this.api, function(aActionName, aActionParams, aApis)
                {
                    if( Ext.isObject(aActionParams) )
                    {
                        if( Ext.isArray(aActionParams.mapping) )
                        {
                            var iMapping= aActionParams.mapping;
                            
                            aActionParams.mapping= {};
                            Ext.each(iMapping, function(aMapping)
                            {
                                this[aMapping.toRequest]= aMapping.fromData;
                            }, aActionParams.mapping);
                        }
                        else if( !!aActionParams.buidFromParams )
                            aApis[aActionName]= Routing.generate(aActionParams.name, aActionParams.params);
                    }
                });
            }
        }
    });
    Thanks for your help

    Alain.
    L'imagination est plus fort que la connaissance (A.E)

  6. #6
    Sencha Premium Member Rakotoseheno's Avatar
    Join Date
    Jun 2010
    Location
    France
    Posts
    4
    Vote Rating
    0
    Rakotoseheno is on a distinguished road

      0  

    Default


    Just for your information, it's work fiine with build 640
    L'imagination est plus fort que la connaissance (A.E)

  7. #7
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,413
    Vote Rating
    129
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Quote Originally Posted by Rakotoseheno View Post
    Just for your information, it's work fiine with build 640
    Any chance we can get an example project that works in 640 but is broken in 676? We'd like to fix this issue for yourself and others.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

Thread Participants: 1