[TYPO3-ttnews] page title pre-pended twice in XHR links in tx_news?

Mark Roemermann mark at nasaustralia.com.au
Fri Mar 20 10:46:41 CET 2015


Hi list, I'm not sure if this is a tx_news issue or a realurl issue.

I have tx_news 3.1.0, typo3 6.2.11 and realurl 1.13.3 installed and an
realurl configuration for news to allow human readable dates in the
speaking URL (I had an earlier thread asking about issues with that).

It has been working fine for weeks.  However, since a few days ago, my
tx_news list plugin seems to be appending an extra page title to the
start of links passed via XHR in the plugin when going from the list
page to the detail page.

So I have a page with a news plugin in list mode that is configured to
link to a subpage that has the detail display.

An article link in the list is rendered in the page as
href="news-events/article/2015/03/20/article-title/"

When right clicked on and opened in a new tab this will go to the detail
news page successfully.  If I copy the link and paste it in the address
bar it loads the detail page.

If I click directly on the link however a XHR request is made (I assume
to communicate to the news controller to load the detail page?) that
404's because the URL in the XHR is
news-events/news-events/article/2015/03/20/article-title/    Which is an
extra prefixing of the news-events page title.

Back links from the detail page back to the list page are also broken in
a similar way in that they 404 on an XHR.

No other links on the site are broken.

I've tried downgrading typo3 to 6.2.10 and realURL to 1.12 which I was
pretty sure have been the only changes made this week, with no change.

I am using baseurl in the setup (it is an old site that is in need of
rebuild), but this has been working OK so far.

Does anyone know of any obvious things I might have done wrong in
realurl or news to cause this?

Thanks in advance,
--
MarkR.



===================
Typoscript - news
===================
plugin.tx_news.settings {
  displayDummyIfNoMedia = 0
  cropMaxCharacters = 900
      analytics {
          social {
              facebookLike = 0
              facebookShare = 0
              twitter = 0
          }
      }
  detail {
      errorHandling = pageNotFoundHandler
      registerProperties = keywords,title
      showSocialShareButtons = 0
  }
  link {
      skipControllerAndAction = 1
      hrDate = 1
      hrDate {
             day = j
             month = m
             year = Y
      }
  }
  list {
      paginate {
        itemsPerPage = 25
        insertBelow = true
        prevNextHeaderTags = 1
     }
  }
}
=====================
realurl config
=====================
'fixedPostVars' => array(
  'newsDetailConfiguration' => array(
    array(
      'GETvar' => 'tx_news_pi1[year]',
      // Have to comment below out to get eg code to work
      //   'noMatch' => 'bypass',
    ),
    array(
      'GETvar' => 'tx_news_pi1[month]',
      // Have to comment below out to get eg code to work
      //    'noMatch' => 'bypass',
    ),
    array(
      'GETvar' => 'tx_news_pi1[day]',
      // Have to comment below out to get eg code to work
      //    'noMatch' => 'bypass',
    ),
    /*  -- Hiding controllers from page path
    array(
      'GETvar' => 'tx_news_pi1[action]',
      'valueMap' => array(
        'detail' => '',
       ),
       'noMatch' => 'bypass'
     ),
     array(
       'GETvar' => 'tx_news_pi1[controller]',
       'valueMap' => array(
         'News' => '',
       ),
       'noMatch' => 'bypass'
     ),*/
     array(
       'GETvar' => 'tx_news_pi1[news]',
         'lookUpTable' => array(
           'table' => 'tx_news_domain_model_news',
           'id_field' => 'uid',
           'alias_field' => 'title',
           'addWhereClause' => ' AND NOT deleted',
           'useUniqueCache' => 1,
           'useUniqueCache_conf' => array(
               'strtolower' => 1,
               'spaceCharacter' => '-'
            ),
            'languageGetVar' => 'L',
            'languageExceptionUids' => '',
            'languageField' => 'sys_language_uid',
            'transOrigPointerField' => 'l10n_parent',
            'autoUpdate' => 1,
            'expireDays' => 180,
            )
          )
        ),
        'newsCategoryConfiguration' => array(
          array(
            'GETvar' => 'tx_news_pi1[overwriteDemand][categories]',
              'lookUpTable' => array(
                'table' => 'sys_category',
                'id_field' => 'uid',
                'alias_field' => 'title',
                'addWhereClause' => ' AND NOT deleted',
                'useUniqueCache' => 1,
                'useUniqueCache_conf' => array(
                  'strtolower' => 1,
                  'spaceCharacter' => '-'
                )
              )
            )
          ),
          'newsCategoryConfiguration' => array(
            array(
              'GETvar' => 'tx_news_pi1[overwriteDemand][categories]',
                'lookUpTable' => array(
                  'table' => 'sys_category',
                    'id_field' => 'uid',
                    'alias_field' => 'title',
                    'addWhereClause' => ' AND NOT deleted',
                    'useUniqueCache' => 1,
                    'useUniqueCache_conf' => array(
                      'strtolower' => 1,
                      'spaceCharacter' => '-'
                    )
                 )
              )
           ),
           'newsTagConfiguration' => array(
             array(
               'GETvar' => 'tx_news_pi1[overwriteDemand][tags]',
                 'lookUpTable' => array(
                   'table' => 'tx_news_domain_model_tag',
                      'id_field' => 'uid',
                      'alias_field' => 'title',
                      'addWhereClause' => ' AND NOT deleted',
                      'useUniqueCache' => 1,
                      'useUniqueCache_conf' => array(
                        'strtolower' => 1,
                        'spaceCharacter' => '-'
                      )
                  )
              )
          ),
          '629' => 'newsDetailConfiguration',
          //'701' => 'newsDetailConfiguration', // For additional detail
pages, add their uid as well
          '631' => 'newsTagConfiguration',
          '630' => 'newsCategoryConfiguration',
        ),
    'postVarSets' => array(
       '_DEFAULT' => array(
        'controller' => array(
          array(
            'GETvar' => 'tx_news_pi1[action]',
            'noMatch' => 'bypass'
          ),
          array(
            'GETvar' => 'tx_news_pi1[controller]',
            'noMatch' => 'bypass'
          )
        ),
         'dateFilter' => array(
            array(
              'GETvar' => 'tx_news_pi1[overwriteDemand][year]',
            ),
            array(
              'GETvar' => 'tx_news_pi1[overwriteDemand][month]',
            ),
        ),
         'page' => array(
            array(
              'GETvar' => 'tx_news_pi1[@widget_0][currentPage]',
            ),
         ),
      ),
    ),
  ),
=================================


More information about the TYPO3-project-tt-news mailing list