[TYPO3-english] CoolURI and non-admins

Jan Bednarik info at bednarik.org
Tue Mar 6 08:48:25 CET 2012


Well, it's not about CoolUri. When you refer to a class, you need to 
make sure that the class is defined.

Jan

Dne 5.3.2012 21:27, Daniel Lundsgaard Skovenborg napsal(a):
> Hi,
>
> Modifying $TYPO3_CONF_VARS['EXT']['extList'] did not work (and I
> remembered to clear cache).
> It works after I put the following in ext_localconf.php:
>    require_once t3lib_extMgm::extPath($_EXTKEY) . 'class.tx_abdwnlcooluri.php';
> Would you regard this a hack, or is it the usual way to apply custom
> functions in CoolURI?
>
> Regards,
> Daniel
>
> 2012/3/5 Jan Bednarik<info at bednarik.org>
>>
>> Hi,
>>
>> so definitely the bug is in your code ;)
>>
>> I don't know in what order TYPO3 includes extension classes, maybe the order of extList defined in localconf.php? Try to put your extension before cooluri.
>>
>> Or put require/include into localconf, so the class would be defined.
>>
>> Jan
>>
>> Dne 5.3.2012 16:18, Daniel Lundsgaard Skovenborg napsal(a):
>>
>>> Hi Jan,
>>>
>>> I use TYPO3 4.5.11 and CoolURI 1.0.28 and ordinary HMENU's.
>>> But I just came closer to the source of the problem:
>>> In short: In my setup, I use a userfunc from a class from an extension I've
>>> written. When not logged in and cache has not just been cleared, the
>>> extension is loaded *after* links are translated.
>>>
>>> The details:
>>>
>>> I have written an extension with some functions for the setup, including
>>> one which is used instead of tx_cooluri::getPageTitle. That is, in my
>>> pagepath element I have:
>>> <userfunc>tx_abdwnlcooluri->getPageTitleOrDownload</userfunc>.
>>>
>>> It turns out that if the admin clears all cache, then URL's will be
>>> generated next time a page is visited. But only for *one* page visit. For
>>> example:
>>>
>>>     1. Admin deletes link cache and clears TYPO3 cache.
>>>     2. User visits front page. Main menu URL's are generated.
>>>     3. User clicks an item in the main menu to visit a page. URL's for
>>>     subpages are *not *generated.
>>>     4. Admin clears TYPO3 cache.
>>>     5. User refreshes page. URL's for subpages are now generated.
>>>
>>> At stage 3 the following turns up in the PHP error log:
>>> Core: Error handler (FE): PHP Warning: call_user_func() expects parameter 1
>>> to be a valid callback, class 'tx_abdwnlcooluri' not found in
>>> .../typo3conf/ext/cooluri/cooluri/link.Functions.php line 320
>>>
>>> Indeed, a call to error_log before the class declaration shows that that my
>>> extension is loaded *after* the link translation.
>>>
>>> What to do now?
>>>
>>> Regards,
>>> Daniel
>>>
>>> 2012/3/3 Jan Bednarik<info at bednarik.org>
>>>
>>>> Well, CoolUri links are generated whenever typolink function calls certain
>>>> page. So if you don't have standard structure with menus and stuff, then
>>>> links are not generated. Meaning, if you create a page and you don't have
>>>> any link to this page, then URL won't be generated.
>>>>
>>>>
>>>> Jan
>>>>
>>>> Dne 2.3.2012 21:09, Daniel Lundsgaard Skovenborg napsal(a):
>>>>
>>>>> Hi,
>>>>>
>>>>>
>>>>> Is CoolURI supposed to generate URL's only when an logged in admin user
>>>>> visits a page? At least, that is what I'm experiencing, and it means that
>>>>> if an ordinary BE-user creates a page, the menu item links to the root of
>>>>> the website until an admin user visits the site.
>>>>> Furthermore, it means that if I press "Delete everything and start again"
>>>>> I'll have to visit every page on the site that have subpages so that URL's
>>>>> are generated. I could create a crawler, but I will not waste my time on
>>>>> that if I have just missed something in the configuration.
>>>>>
>>>>> Regards,
>>>>> Daniel Lundsgaard Skovenborg
>>>>>
>>>>>
>>>> ______________________________**_________________
>>>> TYPO3-english mailing list
>>>> TYPO3-english at lists.typo3.org
>>>> http://lists.typo3.org/cgi-**bin/mailman/listinfo/typo3-**english<http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english>
>>>>
>>>
>>>
>>>
>>
>> _______________________________________________
>> TYPO3-english mailing list
>> TYPO3-english at lists.typo3.org
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
>
>
>
>
> --
> http://waldeinburg.dk



More information about the TYPO3-english mailing list