Extension

Developer
Supported

Crosslinking

ExpressionEngine 2

Back to this add-on's main page
View Other Add-ons From Yuri Salimovskiy

     

You must be logged in to post.

safecracker compatibility

Bug Report

Cellardoor
Cellardoor

hey i have a problem with crosslinking and safecracker compatibility

crosslinking works well except for safecracker if i enable the crosslinking addon the safecracker sumbit form gives an error

The URI you submitted has disallowed characters.

the uri looks like

index.php/wiki2/<a

i dont see where the “<a” comes from, it works with the addon disabled
if i press submit a second time it will update the field, but if there is a crosslink word in it i get an other error

A PHP Error was encountered

Severity
User Warning

Message
Invalid EE Conditional Variable{if "the crosslink word here"}

Filename
libraries/Functions.php

Line Number
2855
A PHP Error was encountered

Severity
Warning

Message
Cannot modify header information headers already sent by (output started at /home/develop/public_html/intern/system/codeigniter/system/core/Exceptions.php:170)

Filenamecore/Common.php

Line Number
412 

the safecracker code i use

{exp:safecracker channel="wiki" return="wiki2/{url_title}" preserve_checkboxes="yes" include_jquery="no" require_entry="yes" entry_id="{entry_id}"}
      
<textarea name="knowledge" id="knowledge" class="span9" rows="2">{no_crosslink}{knowledge}{/no_crosslink}</textarea>
      <
input type="submit" value="Submit">
{/exp:safecracker} 

i did try with and without the no_crosslink tags

Cellardoor
# 1
Cellardoor

oke i fixed the first error with putting the {url_title} in no_crosslink tags

{exp:safecracker channel="wiki" return="wiki2/{no_crosslink}{url_title}{/no_crosslink}" preserve_checkboxes="yes" include_jquery="no" require_entry="yes" entry_id="{entry_id}"}
      
<textarea name="knowledge" id="knowledge" class="span9" rows="2">{no_crosslink}{knowledge}{/no_crosslink}</textarea>
      <
input type="submit" value="Submit">
{/exp:safecracker} 

and i wont get error 2 after removing the if statement where safecracker was wrapped in.

{if knowledge}
<div id="edit">
{exp:safecracker channel="wiki" return="wiki2/{no_crosslink}{url_title}{/no_crosslink}" preserve_checkboxes="yes" include_jquery="no" require_entry="yes" entry_id="{no_crosslink}{entry_id}{/no_crosslink}"}
      
<textarea name="knowledge" id="knowledge" class="span9" rows="2">{no_crosslink}{knowledge}{/no_crosslink}</textarea>
      <
input type="submit" value="Submit">
{/exp:safecracker}
</div>
{/if} 

but i need them

Yuri Salimovskiy
# 2
Developer
Yuri Salimovskiy

Is “knowledge” a crosslinking keyword?

Please try replacing {if knowledge} with

{if "{knowledge}"!=""


or if that does not work too with

{if "{no_crosslink}{knowledge}{/no_crosslink}"!=""
Cellardoor
# 3
Cellardoor

it wasnt by time of posting but it is now :)

and i also had to wrap the id and name parameters in {no_crosslink} is that normal behavior?

{exp:safecracker channel="wiki" return="wiki2/{no_crosslink}{url_title}{/no_crosslink}" preserve_checkboxes="yes" include_jquery="no" require_entry="yes" entry_id="{no_crosslink}{entry_id}{/no_crosslink}"}
      
<textarea name={no_crosslink}"knowledge"{/no_crosslink} id={no_crosslink}"knowledge"{/no_crosslink} class="span9" rows="2">{no_crosslink}{knowledge}{/no_crosslink}</textarea>
      <
input type="submit" value="Submit">
{/exp:safecracker} 

also i dont seem to get {exp:crosslinking} to work instead

Yuri Salimovskiy
# 4
Developer
Yuri Salimovskiy

What are your rules? Is that set or keywords or you’re pulling the list for channel titles?

The tags you need have is awkward, I know - but I’m afraid it’s the only way to get things working now. I’ll add a fix in next release, but can’t name you the date.

and there is no {exp:crosslinking} tag

Cellardoor
# 5
Cellardoor

im pulling the list for channel titles, no keywords set

but thanks for the help, i will look forward to the next release

the {exp:crosslinking} tag was mentioned in a other topic

You can wrap with {exp:crosslinking} only that part of template where you want the replacement to have place.
You can also have multiple {no_crosslinking} blocks.
I believe that gives enough flexibility.

Yuri Salimovskiy
# 6
Developer
Yuri Salimovskiy

That tag is not available anymore. I don’t remember the details, but I had to remove it for some reason

Updated the other topic to avoid confusions