PDA

View Full Version : [INFOREQ] I can't load my archive project !



Rakotoseheno
11 Dec 2012, 6:14 AM
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

aconran
11 Dec 2012, 10:27 AM
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?

Rakotoseheno
11 Dec 2012, 2:38 PM
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.

aconran
11 Dec 2012, 5:19 PM
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.

Rakotoseheno
12 Dec 2012, 12:18 AM
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 :



// 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'
}
}






////////////////////////////////////////////////////////////////////////////////////
// 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.

Rakotoseheno
12 Dec 2012, 12:20 AM
Just for your information, it's work fiine with build 640

aconran
12 Dec 2012, 9:42 AM
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.