castiron / cicregister

TYPO3 Front-end User Registration and Login (ExtBase/Fluid)
14 stars 4 forks source link

Class 'Tx_Cicbase_Domain_Repository_BaseRepository' not found #6

Closed ghost closed 11 years ago

ghost commented 11 years ago

hi,

i get this error message:

Fatal error: Class 'Tx_Cicbase_Domain_Repository_BaseRepository' not found in /var/www/hella/typo3conf/ext/cicregister/Classes/Domain/Repository/FrontendUserRepository.php on line 35

i could not find Tx_Cicbase_Domain_Repository_BaseRepository in current master of EXT:cicbase

zdavis commented 11 years ago

Thanks for reporting this. I'm assigning this issue to Peter, since his commit #41bc7fe9 causes this problem. I've asked him to remove this dependency and to explicitly include whatever functionality he's trying to get from the base repo class in the cicregister repo class, so that this class continues to extend the extbase use repo. He'll likely push a fix today.

best, Zach

petersooley commented 11 years ago

Fixed. 3e74578aa3

Peter

zdavis commented 11 years ago

Hey Peter,

Was the goal of the change to address the problems with storage pids? If so, I think that bundling the functionality that exists in the sjcert base repo, which we talked about the other day, into cicregister might be useful. What do you think?

Zach

petersooley commented 11 years ago

Zach,

I'm really glad you asked. I'd love to show you the solution I came up with. It wasn't exactly what we talked about, but much less hands on.

I looked into how ExtBase was handling storagePids and came up with the idea to extend ExtBase's QueryFactory. I also discovered that we can set a property's newRecordStoragePid from typoscript. Something the SJ solution was doing manually by overriding the repository's add() method. So, to work with the framework and not against it, I put the storagePid configuration in the same place that you would put the newRecordStoragePId. Doing it this way, extending QueryFactory, means we don't need to derive all of our repositories from a specific class to get the new storagePid functionality. It's also backwards compatible, because we're just extending the behavior of the QueryFactory, not changing it.

Here's the commit. And here's a sample setup.txt

Holler if you see any potential issues.

Peter

zdavis commented 11 years ago

Oh yeah, that's definitely a more elegant solution than what I had come up with on SJ. Nice to see you take that a step farther.

If I read your code right, it looks like the change to QueryFactory is 100% backward compatible. That is, you look to see if a class-specific storagePid is set and if you don't find one, you just fall back to the normal ExtBase storage pid setting.

Would you mind adding a simple Readme file to CICBase that documents the behavior your change adds? It's such a useful tweak to ExtBase, I'm worried that we'll forget about it if it's not documented somewhere. If you could just start the Readme with a brief description of this feature, I can circle back and right more documentation about the other bits and pieces CICBase provides. Thanks, Peter!

Since we're totally off topic now, I'm going to go ahead and close this issue. Thanks again, @mostwanted1976 for bringing this to our attention.

ZD