| User | Post |
|
6:52 am August 1, 2009
| Mishkin
Member
| | Falun, Sweden | |
|
| posts 12 |
|
|
Back when it was posted but I redownloaded it just now and it didn't solve the problem.
|
|
|
12:21 pm August 8, 2009
| rpaskowitz
Member
| | | |
|
| posts 3 |
|
|
I'm running Role Scoper 1.0.6 on WP 2.8.1 with qTranslate 2.4 (latest for WP 2.8.1), and am having an issue with page name translation from the front-end of my site.
It's happening in a few places, but the easiest example is that the page titles returned by wp_list_pages() seem to be in whatever language was currently selected when Role Scoper options were last changes. Apart from page titles, all other content seems to be translated.
|
|
|
5:50 pm August 8, 2009
| Kevin
Admin
| | | |
|
| posts 1326 |
|
|
rpaskowitz said:
the page titles returned by wp_list_pages() seem to be in whatever language was currently selected when Role Scoper options were last changes.
That's because of the internal caching Role Scoper does to enhance performance.
Try the updated Role Scoper Development Snapshot. As of this posting, this is the only change from 1.0.6. Caching of page listings will be disabled if you add the following line to your wp-config.php:
define( 'SCOPER_NO_PAGES_CACHE', true );
Likewise for the category listing if you add this line:
define( 'SCOPER_NO_TERMS_CACHE', true );
|
|
|
5:52 pm August 8, 2009
| Kevin
Admin
| | | |
|
| posts 1326 |
|
|
I forgot to mention, you will also need to flush your entire cache once to get rid of the currently stored cache entries.
|
|
|
5:59 pm August 8, 2009
| rpaskowitz
Member
| | | |
|
| posts 3 |
|
|
Thanks for the help Kevin. Now running 1.0.6.1 (also upgraded WP and qTranslate earlier today), and with the defines, my page titles appear translated as expected.
Will the performance impact caused by disabling the caching be limited to times when viewing the list within the admin interface?
|
|
|
6:02 pm August 8, 2009
| Kevin
Admin
| | | |
|
| posts 1326 |
|
|
rpaskowitz said:
Thanks for the help Kevin. Now running 1.0.6.1 (also upgraded WP and qTranslate earlier today), and with the defines, my page titles appear translated as expected.
Will the performance impact caused by disabling the caching be limited to times when viewing the list within the admin interface?
Any performance hit would be seen on the front end too (except for anonymous reader if WP-Super Cache is caching the entire http request).
|
|
|
6:12 pm August 8, 2009
| rpaskowitz
Member
| | | |
|
| posts 3 |
|
|
Is this an added performance hit due to using role-scoper?
Regularly, without caching and with qTranslate, each title would go through the __() function to display only the proper language, which is to be expected.
Not having this part cached isn't a problem for me.
I imagine the cache created for role-scoper runs the text through __() in advance which is why front-end users were only seeing one language. How does role-scoper use this cache on the front-end?
If having the page titles cached is something useful, regardless of qTranslate, it may be worthwhile having the cache contain the "<!--:en-->english text<!--:--><!--:fr-->french text<!--:-->" style strings (do not run through gettext), so that the familiar gettext hit still occurs, but any performance impact of role-scoper can still be avoided.
I think I'm just having a tough time picturing what the cache is used for, granted I've only looked at very little of the code.
Thanks.
|
|
|
8:44 am August 10, 2009
| Kevin
Admin
| | | |
|
| posts 1326 |
|
|
Okay, I took a closer look at this and realized that by forcing Role Scoper's get_pages filter to execute earlier, it can stay cached and still be processed correctly by QTranslate.
Please try the updated Role Scoper Development Snapshot and let me know how it looks. The defines I mentioned above are no longer needed (and not currently applied).
|
|
|
8:48 am August 10, 2009
| Kevin
Admin
| | | |
|
| posts 1326 |
|
|
Mishkin said:
Yes, it's the page parent dropdown on the right side when editing a page. I'm using WP 2.8.2, qTranslate 2.4.1 and the Role Scoper 1.0.5-alpha3.
Strangely this is happening on our development site, just the live one.
Mishkin, I suspect the change I just made will correct your symptom too. QTranslate and Role Scoper had get_pages filters at the same priority level, meaning their execution order depended on which plugin was installed first. Now I'm forcing Role Scoper's to execute earlier.
|
|
|
2:01 pm August 10, 2009
| Kevin
Admin
| | | |
|
| posts 1326 |
|
|
Kevin said:
Okay, I took a closer look at this and realized that by forcing Role Scoper's get_pages filter to execute earlier, it can stay cached and still be processed correctly by QTranslate.
Actually, moving the RS filters earlier caused other problems. In Role Scoper 1.0.7, I've made the disabling of page and category cache automatic if QTranslate is active.
If you're concerned about performance, you can re-enable those caches by editing qtranslate_hooks.php to change the get_pages and get_terms filter priority from 0 to 2. Then (after modifying the QTranslate code) add the following line to wp-config.php:
define( 'SCOPER_QTRANSLATE_COMPAT', true );
|
|
|
5:25 am August 11, 2009
| Mishkin
Member
| | Falun, Sweden | |
|
| posts 12 |
|
|
Kevin, I just updated Role Scoper to version 1.0.7 but it still don't solve my problem. As I said before it only occurs on our live site so I can't fully troubleshoot the problem. I will try to recreate it on the development site later tonight..
|
|