rbitdd
Returning Responder

Deleted page brings "no target selected"-error

Jump to solution

Hello Community,

I wrote a link template for a linklist.

My template looks like this:

$CMS_IF(!lt_pageref.isEmpty && !lt_text.isEmpty)$<a href="$CMS_REF(lt_pageref)$">$CMS_VALUE(lt_text)$</a>$CMS_END_IF$

A co-worker deleted the referenced pages. So I get now the error message:

($CMS_REF(lt_pageref)$ at 1, 59): no target selected

I understand why this happens (the reference is not empty, but it can't be resolved...) but is there anything I can do, so that this error message does no longer appear.

Best wishes and have a nice weekend.

D.

0 Kudos
1 Solution

Accepted Solutions
Peter_Jodeleit
Crownpeak employee

First of all you should talk to your co-worker (or remove him from the admin group) - deleting referenced items is nothing you should do... Smiley Wink

I assume "lt_pageref" if of type FS_REFERENCE. Then " ! lt_pageref.isEmpty" means "editor has chosen a reference" and "lt_pageref.get != null" means "no choice or element deleted".

Peter

View solution in original post

0 Kudos
2 Replies
Peter_Jodeleit
Crownpeak employee

First of all you should talk to your co-worker (or remove him from the admin group) - deleting referenced items is nothing you should do... Smiley Wink

I assume "lt_pageref" if of type FS_REFERENCE. Then " ! lt_pageref.isEmpty" means "editor has chosen a reference" and "lt_pageref.get != null" means "no choice or element deleted".

Peter
0 Kudos

Hello,

yes, it is a "FS_REFERENCE" and it works fine.

Thanks a lot.

My co-worker is rebuilding the site-store and we are working on a new project.

Actually it is no real problem, but it is interesting to fix this error.

Thanks a lot. Have a nice weekend.

D.

0 Kudos