Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Unable to determine connection method on a link! - Known methods: NONSSL SSL


SaveTimE

Recommended Posts

Hello,

 

I have a problem with products_new.php:

 

neue Produkte

angezeigte neue Produkte: 1 bis 10 (von 362 insgesamt)

 

 

Error!

 

Unable to determine connection method on a link!

 

Known methods: NONSSL SSL

 

I found out that the error is connected with (ca. line 66):

<td align="right" class="smallText"><?php echo TEXT_RESULT_PAGE . ' ' . $products_new_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td>

 

here the display of the page stops and the error occures.

 

Because I still use MS2.1 with many individual changes and additional contributes like PayPal, SPPC and others. - Some are from MS2.1 others from MS2.2, I now don't know which class function from display_links to use and how I have to modify these.

 

The file: split_page_results.php from MS2.2 works for the function split_page_results(..) in products_listing.php with sppc 4.1

The file: split_page_results.php from MS2.1 works for the function display_links(..) in products_new.php with sppc 4.1.

 

My question now:

Can someone explain me the different of these Functions between MS2.1 and MS2.2: And why are these funktions not down compatible to MS2.1 and how can I make it?

 

HERE THE FUNCTION FROM split_page_results.php - MS2.1:

 

function display_links($query_numrows, $max_rows_per_page, $max_page_links, $current_page_number, $parameters = '') {

global $PHP_SELF;

 

$class = 'class="pageResults"';

 

if ( tep_not_null($parameters) && (substr($parameters, -1) != '&') ) $parameters .= '&';

 

// calculate number of pages needing links

$num_pages = intval($query_numrows / $max_rows_per_page);

 

// $num_pages now contains int of pages needed unless there is a remainder from division

if ($query_numrows % $max_rows_per_page) $num_pages++; // has remainder so add one page

 

// first button - not displayed on first page

// if ($current_page_number > 1) echo '<a href="' . tep_href_link(basename($PHP_SELF), $parameters . 'page=1', 'NONSSL') . '" ' . $class . ' title=" ' . PREVNEXT_TITLE_FIRST_PAGE . ' ">' . PREVNEXT_BUTTON_FIRST . '</a> ';

 

// previous button - not displayed on first page

if ($current_page_number > 1) echo '<a href="' . tep_href_link(basename($PHP_SELF), $parameters . 'page=' . ($current_page_number - 1), 'NONSSL') . '" ' . $class . ' title=" ' . PREVNEXT_TITLE_PREVIOUS_PAGE . ' "><u>' . PREVNEXT_BUTTON_PREV . '</u></a> ';

 

// check if num_pages > $max_page_links

$cur_window_num = intval($current_page_number / $max_page_links);

if ($current_page_number % $max_page_links) $cur_window_num++;

 

$max_window_num = intval($num_pages / $max_page_links);

if ($num_pages % $max_page_links) $max_window_num++;

 

// previous window of pages

if ($cur_window_num > 1) echo '<a href="' . tep_href_link(basename($PHP_SELF), $parameters . 'page=' . (($cur_window_num - 1) * $max_page_links), 'NONSSL') . '" ' . $class . ' title=" ' . sprintf(PREVNEXT_TITLE_PREV_SET_OF_NO_PAGE, $max_page_links) . ' ">...</a>';

 

// page nn button

for ($jump_to_page = 1 + (($cur_window_num - 1) * $max_page_links); ($jump_to_page <= ($cur_window_num * $max_page_links)) && ($jump_to_page <= $num_pages); $jump_to_page++) {

if ($jump_to_page == $current_page_number) {

echo ' <b>' . $jump_to_page . '</b> ';

} else {

echo ' <a href="' . tep_href_link(basename($PHP_SELF), $parameters . 'page=' . $jump_to_page, 'NONSSL') . '" ' . $class . ' title=" ' . sprintf(PREVNEXT_TITLE_PAGE_NO, $jump_to_page) . ' "><u>' . $jump_to_page . '</u></a> ';

}

}

 

// next window of pages

if ($cur_window_num < $max_window_num) echo '<a href="' . tep_href_link(basename($PHP_SELF), $parameters . 'page=' . (($cur_window_num) * $max_page_links + 1), 'NONSSL') . '" ' . $class . ' title=" ' . sprintf(PREVNEXT_TITLE_NEXT_SET_OF_NO_PAGE, $max_page_links) . ' ">...</a> ';

 

// next button

if (($current_page_number < $num_pages) && ($num_pages != 1)) echo ' <a href="' . tep_href_link(basename($PHP_SELF), $parameters . 'page=' . ($current_page_number + 1), 'NONSSL') . '" ' . $class . ' title=" ' . PREVNEXT_TITLE_NEXT_PAGE . ' "><u>' . PREVNEXT_BUTTON_NEXT . '</u></a> ';

 

// last button

// if (($current_page_number < $num_pages) && ($num_pages != 1)) echo '<a href="' . tep_href_link(basename($PHP_SELF), $parameters . 'page=' . $num_pages, 'NONSSL') . '" ' . $class . ' title=" ' . PREVNEXT_TITLE_LAST_PAGE . ' ">' . PREVNEXT_BUTTON_LAST . '</a> ';

}

 

HERE THE FUNCTION FROM split_page_results.php - MS2.2:

 

function display_links($max_page_links, $parameters = '') {

global $PHP_SELF, $request_type;

 

$display_links_string = '';

 

$class = 'class="pageResults"';

 

if (tep_not_null($parameters) && (substr($parameters, -1) != '&')) $parameters .= '&';

 

// previous button - not displayed on first page

if ($this->current_page_number > 1) $display_links_string .= '<a href="' . tep_href_link(basename($PHP_SELF), $parameters . $this->page_name . '=' . ($this->current_page_number - 1), $request_type) . '" class="pageResults" title=" ' . PREVNEXT_TITLE_PREVIOUS_PAGE . ' "><u>' . PREVNEXT_BUTTON_PREV . '</u></a> ';

 

// check if number_of_pages > $max_page_links

$cur_window_num = intval($this->current_page_number / $max_page_links);

if ($this->current_page_number % $max_page_links) $cur_window_num++;

 

$max_window_num = intval($this->number_of_pages / $max_page_links);

if ($this->number_of_pages % $max_page_links) $max_window_num++;

 

// previous window of pages

if ($cur_window_num > 1) $display_links_string .= '<a href="' . tep_href_link(basename($PHP_SELF), $parameters . $this->page_name . '=' . (($cur_window_num - 1) * $max_page_links), $request_type) . '" class="pageResults" title=" ' . sprintf(PREVNEXT_TITLE_PREV_SET_OF_NO_PAGE, $max_page_links) . ' ">...</a>';

 

// page nn button

for ($jump_to_page = 1 + (($cur_window_num - 1) * $max_page_links); ($jump_to_page <= ($cur_window_num * $max_page_links)) && ($jump_to_page <= $this->number_of_pages); $jump_to_page++) {

if ($jump_to_page == $this->current_page_number) {

$display_links_string .= ' <b>' . $jump_to_page . '</b> ';

} else {

$display_links_string .= ' <a href="' . tep_href_link(basename($PHP_SELF), $parameters . $this->page_name . '=' . $jump_to_page, $request_type) . '" class="pageResults" title=" ' . sprintf(PREVNEXT_TITLE_PAGE_NO, $jump_to_page) . ' "><u>' . $jump_to_page . '</u></a> ';

}

}

 

// next window of pages

if ($cur_window_num < $max_window_num) $display_links_string .= '<a href="' . tep_href_link(basename($PHP_SELF), $parameters . $this->page_name . '=' . (($cur_window_num) * $max_page_links + 1), $request_type) . '" class="pageResults" title=" ' . sprintf(PREVNEXT_TITLE_NEXT_SET_OF_NO_PAGE, $max_page_links) . ' ">...</a> ';

 

// next button

if (($this->current_page_number < $this->number_of_pages) && ($this->number_of_pages != 1)) $display_links_string .= ' <a href="' . tep_href_link(basename($PHP_SELF), $parameters . 'page=' . ($this->current_page_number + 1), $request_type) . '" class="pageResults" title=" ' . PREVNEXT_TITLE_NEXT_PAGE . ' "><u>' . PREVNEXT_BUTTON_NEXT . '</u></a> ';

 

return $display_links_string;

}

 

Any help will be appreciated

 

Thanks

SaveTimE

Link to comment
Share on other sites

SPPC was written for osCommerce 2.2 MS2 and not osCommerce 2.1 MS2. It's a major install and you should not try to install it on an old and outdated version of osCommerce.

 

Vger

:o

shouldn't I ?

Oops - I did it again :-"

 

It works perfect - besides this link access problem.

Some serious help possible?

 

Thanks

SaveTimE

Link to comment
Share on other sites

I solved the problem by using both classe split_page_results as "new split_page_result()" from MS2.1 and " new split_page_results() from MS2.2

 

I will now rewrite the class to find a solution for both requests.

 

I still would like to know what causes the error . Not in CODE terms but generally.

I don't understand the connection between the class split_page_result and the ERROR Known methods: NONSSL SSL

 

Thanky anyhow.

SaveTimE

Link to comment
Share on other sites

  • 1 month later...
I solved the problem by using both classe split_page_results as "new split_page_result()" from MS2.1 and " new split_page_results() from MS2.2

 

I will now rewrite the class to find a solution for both requests.

 

I still would like to know what causes the error . Not in CODE terms but generally.

I don't understand the connection between the class split_page_result and the ERROR Known methods: NONSSL SSL

 

Thanky anyhow.

SaveTimE

 

Hi, im having a problem which relates to this and SSL.

 

On my product_listing pages, the "previous" and "next" buttons are returning a link which begins with https:// instead of http:// so it keeps telling me that the site is changing between secure and nonsecure mode when you're nowhere near the checkout, this is just browsing the pages of each category...

 

I tried looking at split_page_results.php and noticed that your code above has bits like 'NONSSL' included in the code for the next and previous buttons so i put that code on my split_page_results file and it doesnt seem to have changed the next and previous links to NONSSL links, any ideas how to make these links stay in unsecure mode?

 

Here's a link to a page with the problem...: http://www.acousticdimension.ie/template/index.php?cPath=70

 

Thanks.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...