Comments (14)
I'm not sure, I've fully understood this. Can you provide an example of what is stored and what should be stored? Why is the DS non-existent?
from storage.
The issue seems to be with the 2.2.x branch only.
In S 2.2.5, the Datasource name is always Storage
. An output parameter name will be built using dashes, like so:
<ds-storage-cart>
<item handle="item1">item1</item>
</ds-storage-cart>
Now add $ds-storage-cart
to the filter of a second datasource, and the auto-generated dependency will be:
$this->_dependencies = array('$ds-storage-cart');
This dependency can not be resolved, because there is no datasource with this name.
Symphony 2.3.:
I don't have a full-blown 2.3 installation, but some quick tests show that probably the issue does not exist. If you have a parameter like this:
<ds-myfunny-storage.cart>
<item handle="item1">item1</item>
</ds-myfunny-storage.cart>
and add this to a datasource filter, the dependency will be:
$this->_dependencies = array('$ds-myfunny-storage.cart');
which seems to be resolved correctly. (Can you confirm this?)
from storage.
This dependency can not be resolved, because there is no datasource with this name.
So this is a Symphony bug: Symphony doesn't take data sources provided by extensions into account.
which seems to be resolved correctly. (Can you confirm this?)
I'll check that.
from storage.
No, it's not a Symphony bug. It's caused by the naming of the parameter. In the 2.2 example, if you manually change the dependency to be:
$this->_dependencies = array('$ds-storage');
it works!
So I think that this is a flaw in the 2.2.x branch of our extension which can not be solved easily. We might simply add it to the README.
from storage.
But doesn't hat mean, that we have to change the 2.2.x
data source to only return a single output parameter for all groups, see https://github.com/hananils/storage/blob/2.2.x/data-sources/data.storage.php#L48-L50?
if(is_array($groups)) {
$output = array();
foreach($groups as $name => $values) {
array_push($output, array_keys((array)$values));
}
$param_pool['ds-' . $this->dsParamROOTELEMENT] = $output;
}
(Haven't tested that.)
from storage.
That wouldn't help for filtering, because we would mix the items of all groups in a single parameter.
from storage.
But wouldn't that have the same result as renaming your DS manually.
I may be slow today though …
from storage.
You can not rename the Storage DS in the 2.2.x branch. But you can manually change the dependency in your second DS, so the the Storage DS will be executed first. Then filtering works with the parameters provided.
from storage.
Okay. In this case, I don't see a solution as it seems to be a system restriction that there can only be one output parameter per data source in 2.2.5.
from storage.
Yep, this is the reason that params with dots are not allowed in S 2.2, so we had to use dashes.
So we simply add this to the README, right?
from storage.
Seems to be the best option.
Everything else I can think of is hacking Symphony 2.2 and that doesn't make much sense.
from storage.
I will do it.
from storage.
Fixed by f2a7d93.
from storage.
I rebased the 2.2x branch and fixed a bug that I have introduced before. Your best bet is to delete your local version and clone the current repo.
I should always test my own stuff as well.
I should always test my own stuff as well.
I should always test my own stuff as well.
....
from storage.
Related Issues (20)
- Versions HOT 3
- Add 1.3 and 1.4 features to the README HOT 1
- Differing Size and Colour attributes issue HOT 5
- Error on dropping anything using GET method HOT 5
- Event filter: Drop from storage HOT 1
- Storage is hardly ever dropped completely HOT 2
- An error is returned when creating/editing a data source if no storaged context has been created
- Storage should ignore empty values HOT 10
- Actions on non-existing storage HOT 10
- Datasource doesn't show up? HOT 3
- Session data not staying in datasource HOT 29
- Request/discussion validating values that aren't integers? HOT 4
- Storage session timeout possible? HOT 2
- Filter another datasource with Storage Params HOT 3
- Using »Storage: Drop« event filter is triggered even though entry creation is unsuccessful HOT 33
- Problems with Session storage in Internet Explorer HOT 1
- Dropping the last (grouped) item won't drop the storage from the session
- Symphony Fatal Error: syntax error, unexpected '{', expecting function (T_FUNCTION) HOT 4
- Event storage-action gives result "success" although form throws error HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from storage.