|
| 1 | +.. include:: ../Includes.txt |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | +.. _FAQ: |
| 6 | + |
| 7 | +FAQ |
| 8 | +--- |
| 9 | + |
| 10 | + |
| 11 | +.. _Q-How-to-change-order-of-fields-from-which-a-title-is-retrieved: |
| 12 | + |
| 13 | +Q: How to change order of fields from which a title is retrieved? |
| 14 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 15 | + |
| 16 | +**A:** Order is set in element title. Default order is: |
| 17 | +`<title>alias,subtitle,title</title>` |
| 18 | + |
| 19 | + |
| 20 | +.. _Q-How-to-set-a-translation: |
| 21 | + |
| 22 | +Q: How to set a translation? |
| 23 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 24 | + |
| 25 | +**A:** You need to add a subelement <part> to element <uriparts>. Most |
| 26 | +rewriting is from "param[key]=value" to "somecoolvalue". Where the |
| 27 | +rewriting looks for "somecoolvalue" in the database: |
| 28 | + |
| 29 | +:: |
| 30 | + |
| 31 | + <part> |
| 32 | + <parameter>param[key]</parameter> |
| 33 | + <lookindb> |
| 34 | + <to>SELECT title FROM table WHERE uid=$1</to> |
| 35 | + <urlize>1</urlize> |
| 36 | + </lookindb> |
| 37 | + </part> |
| 38 | + |
| 39 | + |
| 40 | +.. _Q-Value-isn-t-translated-OK-Instead-of-national-characters-I-get-dashes: |
| 41 | + |
| 42 | +Q: Value isn't translated OK. Instead of national characters I get dashes. |
| 43 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 44 | + |
| 45 | +**A:** The problem is with Debian server, that doesn't support iconv |
| 46 | +translit conversion very well. The way to fix this is replace all |
| 47 | +occurences of ``<urlize>1</urlize>`` to ``<sanitize>1</sanitize>`` in |
| 48 | +the XML configuration. |
| 49 | + |
| 50 | +**A2:** Instead of sanitize use ``<t3conv>1</t3conv>`` at the same |
| 51 | +places sanitize would be used. And place it into the pagepath element |
| 52 | +as well. |
| 53 | + |
| 54 | + |
| 55 | +.. _Q-I-get-PHP-error-after-installing-CoolURI-extension: |
| 56 | + |
| 57 | +Q: I get PHP error after installing CoolURI extension |
| 58 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 59 | + |
| 60 | +**A:** Please, make sure, you meet all requirements (see above). |
| 61 | + |
| 62 | + |
| 63 | +.. _Q-How-to-migrate-from-simulateStaticDocuments-to-CoolUri: |
| 64 | + |
| 65 | +Q: How to migrate from simulateStaticDocuments to CoolUri |
| 66 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 67 | + |
| 68 | +**A:** You need to update your rewrite rules. |
| 69 | + |
| 70 | +:: |
| 71 | + |
| 72 | + RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f |
| 73 | + RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d |
| 74 | + RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-l |
| 75 | + RewriteRule ^/.+\.(.+)\.[0-9]\.html /index.php?id=$1 [R=301,L,QSA,NE] |
| 76 | + |
| 77 | +Here's description from *Peter Bücker* : |
| 78 | + |
| 79 | +First of all, the left hand side obviously matches the URL format |
| 80 | +generated by SSD. The right hand side redirects all requests to |
| 81 | +/index.php with the id extracted from the request. It does this |
| 82 | +externally, with a HTTP 301 (permanently moved), so that users start |
| 83 | +using the new URLs. Of course, this is the last rule to be evaluated |
| 84 | +(L). In combination with "config.redirectOldLinksToNew = 1", this is |
| 85 | +really nice :-) |
| 86 | + |
| 87 | +Furthermore, QSA tells Apache to append all query strings originally |
| 88 | +found in the request URI to /index.php?id=$1. Without QSA, those query |
| 89 | +strings would be discarded. NE stands for "no escape", which means |
| 90 | +that characters like '[' won't be replaced by their percent-coded |
| 91 | +counterparts. I didn't do further research, but without NE, plugin |
| 92 | +parameters break. |
| 93 | + |
| 94 | +Also note that the 4 mod\_rewrite directives have to be placed just |
| 95 | +above the usual RewriteCond... RewriteRule .\* /index.php stuff. So in |
| 96 | +effect, for httpd.conf, it will look like this: |
| 97 | + |
| 98 | +:: |
| 99 | + |
| 100 | + RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f |
| 101 | + RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d |
| 102 | + RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-l |
| 103 | + RewriteRule ^/.+\.(.+)\.[0-9]\.html /index.php?id=$1 [R=301,L,QSA,NE] |
| 104 | + |
| 105 | + RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f |
| 106 | + RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d |
| 107 | + RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-l |
| 108 | + RewriteRule .* /index.php |
| 109 | + |
| 110 | + |
| 111 | +.. _Q-CoolUri-doesn-t-work-in-ISS-with-ISAPI: |
| 112 | + |
| 113 | +Q: CoolUri doesn't work in ISS with ISAPI |
| 114 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 115 | + |
| 116 | +**A:** Try to add this line to localconf.php. Or set this value using |
| 117 | +the install tool: |
| 118 | + |
| 119 | +`$TYPO3_CONF_VARS['SYS']['requestURIvar'] = '_SERVER|HTTP_X_REWRITE_URL';` |
| 120 | + |
| 121 | + |
| 122 | +.. _Q-How-to-mix-pagepath-with-other-parameters: |
| 123 | + |
| 124 | +Q: How to mix pagepath with other parameters |
| 125 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 126 | + |
| 127 | +**A:** First you need to map parts of pagepath on parameters: |
| 128 | + |
| 129 | +:: |
| 130 | + |
| 131 | + <part pagepath="1"> |
| 132 | + <parameter>p1</parameter> |
| 133 | + </part> |
| 134 | + <part pagepath="1"> |
| 135 | + <parameter>p2</parameter> |
| 136 | + </part> |
| 137 | + <part pagepath="1"> |
| 138 | + <parameter>p3</parameter> |
| 139 | + </part> |
| 140 | + <part pagepath="1"> |
| 141 | + <parameter>p4</parameter> |
| 142 | + </part> |
| 143 | + |
| 144 | +this will map 4 parts of a pagepath to parameters p1 – p4. |
| 145 | + |
| 146 | +Then you need to insert these parameters into paramorder: |
| 147 | + |
| 148 | +:: |
| 149 | + |
| 150 | + <paramorder> |
| 151 | + <param>p1</param> |
| 152 | + <param>L</param> |
| 153 | + <param>p3</param> |
| 154 | + <param>p2</param> |
| 155 | + </paramorder> |
| 156 | + |
| 157 | +this will produce URL like: firstlevel/english/thirdlevel/secondlevel. |
| 158 | + |
| 159 | + |
| 160 | + |
| 161 | + |
| 162 | +.. _Q-I-ve-got-multilanguage-tt-news-and-it-doesn-t-work-just-right: |
| 163 | + |
| 164 | +Q: I've got multilanguage tt\_news and it doesn't work just right |
| 165 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 166 | + |
| 167 | +**A:** Try this setup: |
| 168 | + |
| 169 | +:: |
| 170 | + |
| 171 | + <part> |
| 172 | + <parameter>tx_ttnews[tt_news]</parameter> |
| 173 | + <lookindb> |
| 174 | + <to>SELECT title FROM tt_news WHERE (uid=$1 or l18n_parent=$1) AND sys_language_uid={L=0}</to> |
| 175 | + <t3conv>1</t3conv> |
| 176 | + </lookindb> |
| 177 | + </part> |
| 178 | + |
| 179 | + |
| 180 | + |
| 181 | +.. _Q-I-ve-got-news-with-same-titles-and-I-d-like-to-append-X-where-X-would-be-an-increasing-number: |
| 182 | + |
| 183 | +Q: I've got news with same titles and I'd like to append -X, where X would be an increasing number. |
| 184 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 185 | + |
| 186 | +**A:** Use this query: |
| 187 | + |
| 188 | +:: |
| 189 | + |
| 190 | + SELECT CONCAT(tt1.title,IF(tt2.number>1,CONCAT('-',tt2.number),'')) |
| 191 | + FROM tt_news as tt1, |
| 192 | + (SELECT COUNT(*) AS number FROM tt_news WHERE title=(SELECT title FROM tt_news WHERE uid=$1)) AS tt2 |
| 193 | + WHERE tt1.uid=$1 |
| 194 | + |
| 195 | + |
| 196 | + |
| 197 | + |
| 198 | +.. _Q-I-ve-changed-XML-configuration-but-nothing-happens: |
| 199 | + |
| 200 | +Q: I've changed XML configuration but nothing happens |
| 201 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 202 | + |
| 203 | +**A:** Parsed XML is now stored in users session. However, when user |
| 204 | +is logged in BE the session is omited, but this is still not working |
| 205 | +very well. So when you tweak your XML, you may need to close browser |
| 206 | +before you'd see some results. |
| 207 | + |
0 commit comments