Project

General

Profile

Actions

Feature #11867

closed

Wrong typeNum is not detected

Added by Philipp Gampe almost 14 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Category:
Linkvalidator
Target version:
-
Start date:
2011-01-04
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
medium
Sprint Focus:

Description

You can pass the typeNum (&type=xxx) with <link uid,type>Text</link>. This is not catched at all. At least it is not broken.

Not sure how to easily solve this ... maybe create real link after all other test passed and check with external link checker? Otherwise we would need pull up TS parser, get the values and check if those are set - but still it might not be working. Just pulling up typolink, get the URL and be done by accessing as external URL might be easier.


Files

bug_11867.diff (6.3 KB) bug_11867.diff Michael Miousse, 2011-01-11 18:54
bug_11867_v2.diff (6.66 KB) bug_11867_v2.diff Michael Miousse, 2011-01-12 15:35
bug_11867_v3.diff (6.65 KB) bug_11867_v3.diff Michael Miousse, 2011-01-12 19:57

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Task #83265: Drop support for &id=23.1 (id.type) syntaxClosedBenni Mack2017-12-08

Actions
Actions #1

Updated by Michael Miousse almost 14 years ago

I'm not for the suggestion of of parsing it with the external url parser.
It would mean that every single internal link would be parsed and would majorly slow the process.

We better check the ts it is shorter then a http request

Actions #2

Updated by Patrick Gaumond almost 14 years ago

  • Status changed from New to Needs Feedback
Actions #3

Updated by Michael Miousse almost 14 years ago

Here is a patch to fix the issue

Actions #4

Updated by Philipp Gampe almost 14 years ago

great to see a patch ... I will take a deeper look the next days (lastest at the bugday).

Actions #5

Updated by Philipp Gampe almost 14 years ago

sorry, it does not work... it fails to detect any other typenum.

I set up a link to ?type=1234

and did this in an extension template:

test = PAGE
test.typeNum = 1234
test.10 < page.10

which brings up a the frontend page just fine. But it is reported as broken link :(

Actions #6

Updated by Michael Miousse almost 14 years ago

Here is a v2 of the patch
work with <link 1,2 .... and <link 1,0,&type=2
I'll be waiting your feedback

Actions #7

Updated by Philipp Gampe almost 14 years ago

I does not work for me :(

I use those links (being on page 73) - disabled RTE

<link 73,98 - internal-link>good typeNum</link>
<link 73,1234 - internal-link>good typeNum</link>
<link 73,666 - internal-link>bad typeNum</link>
<link 73,0 - internal-link>good main page</link>

That shows all links except the last one as failing. But only typeNum 666 is not defined if I check in FE.

Actions #8

Updated by Philipp Gampe almost 14 years ago

I debugged now: until line 118 everything seems to be fine. But the condition seems to be always true...

Actions #9

Updated by Philipp Gampe almost 14 years ago

now I got it... you did not pass the param $linkParams to the function cheklinks (BTW should be checklinks anyway).

I fixed it in my local copy, but now I get a fatal:

Fatal error: Call to a member function versionOL() on a non-object in home/spieler/t3_playground/t3_trunk/t3lib/class.t3lib_tstemplate.php on line 753

it happens on the second links, even trough $this->rootline is exactly the same.

Actions #10

Updated by Michael Miousse almost 14 years ago

sorry i took the wrong file for the patch

error was in this function :
+ function chekTypNum($typeNum) {
+ $response = TRUE;
+ $befunc = t3lib_div::makeInstance('t3lib_BEfunc');
+ $this->rootline =$befunc->BEgetRootLine($linkParams0);
+ if(is_array($this->rootline) && !empty($this->rootline)){
+ $this->tmpl = t3lib_div::makeInstance('t3lib_TStemplate');
+ $this->tmpl->tt_track = FALSE;
+ $this->tmpl->init();
+ $this->tmpl->start($this->rootline);
+ }
+ $this->sPre = $this->tmpl->setup['types.'][$linkParams1];
+ $this->pSetup = $this->tmpl->setup[$this->sPre.'.'];

+ if (!is_array($this->pSetup)) {
+ $response = FALSE;
+ }
+ return $response;
+ }

$linkParams1 should be $typeNum

by the way the check link function create $linkParams from t3lib_div::trimExplode(',',$softRefEntry['matchString']); whitch is pass to the function

Actions #11

Updated by Michael Miousse almost 14 years ago

wait now i got the same error as you ill investigate

Actions #12

Updated by Michael Miousse almost 14 years ago

no everyting is fine
i was not on a dev version of typo3

the error you point cannot happend at least with the trunk version of TYPO3 the line the error give you is :
if (is_object($GLOBALS['TSFE'])) { // Frontend:
$GLOBALS['TSFE']->sys_page->versionOL('sys_template', $row);
} else { // Backend:
t3lib_BEfunc::workspaceOL('sys_template', $row);
}
since their is a is_object before the call
the error you describe cannot happend

are you working with the trunk version of TYPO3?

Actions #13

Updated by Philipp Gampe almost 14 years ago

yes always while testing linkvalidator

Actions #14

Updated by Philipp Gampe almost 14 years ago

Hi Michael,

can redo the patch ... I fear it is a complete mess with current trunk now as too much changed.

I also think, we should postpone this to 4.6

Actions #15

Updated by Michael Miousse almost 14 years ago

  • Status changed from Needs Feedback to On Hold

Philipp Gampe wrote:

Hi Michael,

can redo the patch ... I fear it is a complete mess with current trunk now as too much changed.

I also think, we should postpone this to 4.6

You are rigth ill redo a patch after the release ill put it on hold until then

Actions #16

Updated by Philipp Gampe about 13 years ago

  • Target version set to 4.7.0
  • TYPO3 Version set to 4.7

Feature --> postponed

Actions #17

Updated by Philipp Gampe over 12 years ago

  • Target version changed from 4.7.0 to 6.0.0
Actions #18

Updated by Michael Stucki almost 11 years ago

  • Category set to Linkvalidator
Actions #19

Updated by Michael Stucki almost 11 years ago

  • Project changed from 1510 to TYPO3 Core
  • Category changed from Linkvalidator to Linkvalidator
Actions #20

Updated by Mathias Schreiber almost 10 years ago

  • Status changed from On Hold to Needs Feedback
  • Assignee set to Mathias Schreiber

do we want to continue here?

Actions #21

Updated by Philipp Gampe almost 10 years ago

  • Status changed from Needs Feedback to New
  • Complexity set to medium

Yes, this would be helpful, but requires some thinking.

Actions #22

Updated by Mathias Schreiber about 9 years ago

  • Target version deleted (6.0.0)
Actions #23

Updated by Georg Ringer almost 7 years ago

  • Related to Task #83265: Drop support for &id=23.1 (id.type) syntax added
Actions #24

Updated by Georg Ringer about 6 years ago

  • Status changed from New to Closed

I am closing this issue has the code for creating and detecting links has changed a lot, especially with 9.

Actions

Also available in: Atom PDF