sktiwari1988 Posted September 22, 2017 Share Posted September 22, 2017 Thank you Jack Quote No external links here, thank you Link to comment Share on other sites More sharing options...
mk_osc Posted September 27, 2017 Share Posted September 27, 2017 (edited) Hello, on the admin page "social" [header_tags_seo_social.php] Header Tags SEO V 3.3.5 I'm getting this error when clicking 'Save': "Images and urls do not match." Even, if I don't edit anything and just try to submit the few pre-filled entries. Any ideas, what might be causing this? Edited September 28, 2017 by mk_osc screenshot added Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted September 28, 2017 Author Share Posted September 28, 2017 That occurs when the url is not formatted correctly. Notice the text at the top state "...important to use the keywords URL and TITLE..." So if you have changed one of the entries, that is what it is. But there should be icons showing below the size options. That happens when the configure file isn't setup correctly and the code can't find the images. So my guess is that that is the problem. I think it is the DIR_WS_CATALOG, DIR_WS_HTTPS_CATALOG or DIR_FS_CATALOG that causes it (I'm not where I can check it ATM). This thread shows the basic settings and may help. If you can't get it to work, post your configure file here, minus the database credentials. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
mk_osc Posted September 28, 2017 Share Posted September 28, 2017 Even if I clear all pre filled URL's I still get the same error. Here is my admin configure file: define('HTTP_SERVER', 'https://www.domain.com'); define('HTTPS_SERVER', 'https://www.domain.com'); define('ENABLE_SSL', true); define('HTTP_COOKIE_DOMAIN', ''); define('HTTPS_COOKIE_DOMAIN', ''); define('HTTP_COOKIE_PATH', '/mypanel'); define('HTTPS_COOKIE_PATH', '/mypanel'); define('HTTP_CATALOG_SERVER', 'https://www.domain.com'); define('HTTPS_CATALOG_SERVER', 'https://www.domain.com'); define('ENABLE_SSL_CATALOG', 'true'); define('DIR_FS_DOCUMENT_ROOT', '/home/username/public_html/'); define('DIR_WS_ADMIN', '/mypanel/'); define('DIR_WS_HTTPS_ADMIN', '/mypanel/'); define('DIR_FS_ADMIN', '/home/username/public_html/mypanel/'); define('DIR_WS_CATALOG', '/'); define('DIR_WS_HTTPS_CATALOG', '/'); define('DIR_FS_CATALOG', '/home/username/public_html/'); define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/'); define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/'); define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/'); define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); I have checked the php error log and the apache error log. Both logs don't show any error. I think I'm lost as I don't know where to check in order to isolate the issue further. Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted September 28, 2017 Author Share Posted September 28, 2017 This is because one of the definitions that is used in the code was removed in the BS configure file. I hadn't noticed this problem so I appreciate you mentioning it. To fix it, edit the admin/header_tags_seo_ajax.php file and change this line $pathLocal = HTTPS_SERVER . $slash .DIR_WS_CATALOG_IMAGES . 'socialbookmark/'; to this $pathLocal = DIR_FS_CATALOG . $slash . 'images/socialbookmark/'; Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
mk_osc Posted September 28, 2017 Share Posted September 28, 2017 (edited) ah, cool. Good find. However I noticed these lines in the original admin/header_tags_seo_ajax.php file: $arry['div'] .= '<div class="container">'; $path = HTTPS_SERVER . DIR_WS_CATALOG_IMAGES . 'socialbookmark/'; $slash = substr(DIR_FS_CATALOG, -1) == '/' ? '' : '/'; $pathLocal = DIR_FS_CATALOG . $slash .DIR_WS_IMAGES . 'socialbookmark/'; so I changed the lines to: $arry['div'] .= '<div class="container">'; $pathLocal = DIR_FS_CATALOG . $slash . 'images/socialbookmark/'; $slash = substr(DIR_FS_CATALOG, -1) == '/' ? '' : '/'; I can now save it, but the icons which probably should show up, don't show on the admin page. See screenshot. Thank you. Edited September 28, 2017 by mk_osc Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted September 28, 2017 Author Share Posted September 28, 2017 Put back the extra code you deleted and it should work. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
mk_osc Posted September 28, 2017 Share Posted September 28, 2017 of course, I have tested it before But when I put back the line $pathLocal = DIR_FS_CATALOG . $slash .DIR_WS_IMAGES . 'socialbookmark/'; I have the same scenario as before. See screenshot. So I assumed, it was there in error. But here you go. hmmm .... everything back to start Quote Link to comment Share on other sites More sharing options...
ArtcoInc Posted September 28, 2017 Share Posted September 28, 2017 @mk_osc 1 hour ago, mk_osc said: so I changed the lines to: $arry['div'] .= '<div class="container">'; $pathLocal = DIR_FS_CATALOG . $slash . 'images/socialbookmark/'; $slash = substr(DIR_FS_CATALOG, -1) == '/' ? '' : '/'; I can now save it, but the icons which probably should show up, don't show on the admin page. Shouldn't the $slash definition come before the $pathLocal definition? Malcolm Quote Link to comment Share on other sites More sharing options...
mk_osc Posted September 28, 2017 Share Posted September 28, 2017 even if I move the line and have: $arry['div'] .= '<div class="container">'; $slash = substr(DIR_FS_CATALOG, -1) == '/' ? '' : '/'; $pathLocal = DIR_FS_CATALOG . $slash . 'images/socialbookmark/'; $pathLocal = DIR_FS_CATALOG . $slash .DIR_WS_IMAGES . 'socialbookmark/'; it makes no difference -> icons not loading, text not loading, check marks not loading ..... Quote Link to comment Share on other sites More sharing options...
mk_osc Posted September 28, 2017 Share Posted September 28, 2017 resolved: the lines should look like this: $arry['div'] .= '<div class="container">'; $path = HTTPS_SERVER . DIR_WS_CATALOG_IMAGES . 'socialbookmark/'; $slash = substr(DIR_FS_CATALOG, -1) == '/' ? '' : '/'; $pathLocal = DIR_FS_CATALOG . $slash . 'images/socialbookmark/'; I was confused first, since I did not found the quoted line: $pathLocal = HTTPS_SERVER . $slash .DIR_WS_CATALOG_IMAGES . 'socialbookmark/'; in the original file. And replaced the only one with HTTPS_SERVER in it which was wrong. Now the icons are loading fine. Thanks. Quote Link to comment Share on other sites More sharing options...
mk_osc Posted September 28, 2017 Share Posted September 28, 2017 (edited) However, I'm experiencing a new problem. The link to Facebook is not working http://www.facebook.com/share.php?u=URL&TITLE or https://www.facebook.com/sharer/sharer.php?u=URL&TITLE when being used on a page and I click the link, it's producing an error on the facebook server, and the URL at facebook says: https://www.facebook.com/dialog/return/close?error_code=100&error_message=param+media+must+be+an+array.#_=_ and the browser window with the facebook page is closed. After some research it seems, that facebook is accepting only the URL with no TITLE, but I don't know how to do this, since it says I always need to use URL and TITLE in the URL's of the header_tags_seo_social.php Edited September 28, 2017 by mk_osc text added Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted September 29, 2017 Author Share Posted September 29, 2017 The format of both of the urls you show are valid. Maybe it is something in your domain name or title that the code isn't converting correctly? What happens if you substitute your domain and title in this url and then paste it into a browser: http://www.facebook.com/share.php?u=URL&TITLE Mouseover the FB icon on the site and make sure you copy it exactly as it appears for the test. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
mk_osc Posted September 29, 2017 Share Posted September 29, 2017 I'm not exactly sure what I should substitute. The link appears as: https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fwww.debooks4u.com%2Fegypt-1890s-book-color-photos-old-cairo-thebes-sphinx-medinet-habu-p-916.html&Egypt+1890s+Book+w%2F+color+photos+of+Old+Cairo+Thebes+Sphinx+Medinet+Habu+Nile&media=https://www.debooks4u.com/images/autouregyptg.jpg&title=Egypt+1890s+Book+w%2F+color+photos+of+Old+Cairo+Thebes+Sphinx+Medinet+Habu+Nile When I shorten the link and remove the link to the media item: https://www.debooks4u.com/images/autouregyptg.jpg I have the URL: https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fwww.debooks4u.com%2Fegypt-1890s-book-color-photos-old-cairo-thebes-sphinx-medinet-habu-p-916.html&Egypt+1890s+Book+w%2F+color+photos+of+Old+Cairo+Thebes+Sphinx+Medinet+Habu+Nile&media=&title=Egypt+1890s+Book+w%2F+color+photos+of+Old+Cairo+Thebes+Sphinx+Medinet+Habu+Nile And when I manually post it into the browser it is working now, and facebook is importing the media, though. So not sure, where the conflict is here. Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted September 29, 2017 Author Share Posted September 29, 2017 You've altered the link code in admin so I can't help with this. If you restore it to the original you should see that it will work. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
mk_osc Posted September 29, 2017 Share Posted September 29, 2017 hmm, which file is it please ? Thanks. Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted September 29, 2017 Author Share Posted September 29, 2017 The url to use in the admin is http://www.facebook.com/share.php?u=URL&TITLE Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
mk_osc Posted September 29, 2017 Share Posted September 29, 2017 ok, I tried that before, but the behavior and results are the same. It is now: http://www.facebook.com/share.php?u=https%3A%2F%2Fwww.debooks4u.com%2Fegypt-1890s-book-color-photos-old-cairo-thebes-sphinx-medinet-habu-p-916.html&Egypt+1890s+Book+w%2F+color+photos+of+Old+Cairo+Thebes+Sphinx+Medinet+Habu+Nile&media=https://www.debooks4u.com/images/autouregyptg.jpg&title=Egypt+1890s+Book+w%2F+color+photos+of+Old+Cairo+Thebes+Sphinx+Medinet+Habu+Nile but still the same issue. Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted September 29, 2017 Author Share Posted September 29, 2017 The url you show has media= in it. That's not part of the social tag code in this addon. I don't know why it is showing up. maybe it is in your products title? Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
mk_osc Posted September 29, 2017 Share Posted September 29, 2017 (edited) hmm, I searched my files on the server for media= and got a match on the file from your package Use_if_version_BootStrap\catalog_only_new_files\includes\modules\header_tags_social_bookmarks.php on two lines: /home/username/public_html/includes/modules/header_tags_social_bookmarks.php:14: $IMG = (tep_not_null($product_info['products_image']) ? "&media=" . HTTP_SERVER . DIR_WS_HTTP_CATALOG. 'images/' . $product_info['products_image'] : ''); /home/username/public_html/includes/modules/header_tags_social_bookmarks.php:25: $IMG = (tep_not_null($category['categories_image']) ? "&media=" . HTTP_SERVER . DIR_WS_HTTP_CATALOG. 'images/' . $category['categories_image'] : ''); Is this the code which is responsible for the media= or where should I look at otherwise? Any ideas? Thanks Edited September 29, 2017 by mk_osc Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted September 29, 2017 Author Share Posted September 29, 2017 You are correct. I didn't realize the problem was with a product page so I was just looking at the admin code and the FB on the home page. I totally forgot about that code. I apologize for the confusion. It appears FB has changed their rules since I can't find any reference to the media tag now, though I didn't spend a lot of time on it. You can try removing the first line that starts with $IMG = (tep_not_nul What happens if you try the button on a category page? If it fails there too, try removing the second line that starts that way. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
mk_osc Posted September 29, 2017 Share Posted September 29, 2017 (edited) Cool, that did the trick. The button on the category page had the same issue, so I removed that line as well. However sharing category pages with facebook button no longer show category images on facebook. They don't show up with pinterest or others either, so not sure what's causing this. Now to another issue, the social bookmarks are appearing twice on the index.php I've followed the instructions which say to add it twice: FIND: include('includes/modules/product_listing.php'); ?> </div> REPLACE WITH: /*** Begin Header Tags SEO ***/ if (tep_not_null($htc['htc_description'])) { echo '<h2 style="text-decoration:none;">'. $htc['htc_description'] . '</h2>'; } /*** End Header Tags SEO ***/ include('includes/modules/product_listing.php'); ?> </div> <!--- BEGIN Header Tags SEO Social Bookmarks --> <?php if (HEADER_TAGS_DISPLAY_SOCIAL_BOOKMARKS == 'true') { echo '<div style="margin-top:5px; float:right;">'; include('includes/modules/header_tags_social_bookmarks.php'); echo '</div>'; } ?> <!--- END Header Tags SEO Social Bookmarks --> FIND: <?php echo $oscTemplate->getContent('index'); ?> </div> ADD BENEATH: <?php //<!--- Begin Header Tags SEO Home Page Text and Social Bookmarks --> if (tep_not_null($header_tags_array['home_page_text'])) { echo '<div>'; echo '<div style="padding:10px 0;">' . $header_tags_array['home_page_text'] . '</div>'; echo '</div>'; } if (HEADER_TAGS_DISPLAY_SOCIAL_BOOKMARKS == 'true') { echo '<div>'; include('includes/modules/header_tags_social_bookmarks.php'); echo '</div>'; } //<!--- END Header Tags SEO Home Page Text and Social Bookmarks --> ?> They show up twice as shown in the screenshot. Any ideas? .. sorry for all my questions Edited September 29, 2017 by mk_osc test added Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted September 30, 2017 Author Share Posted September 30, 2017 It's because of all of the versions of oscommerce or more accurately, the versions of the files they use. The include statement is in a different section of the index file so that will not affect the home page. The second change may not be needed if a change was made to index module. Try removing that second block of code to see if that helps. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
mk_osc Posted September 30, 2017 Share Posted September 30, 2017 I've removed the second block and this fixed the problem. Thank you! I'm trying to troubleshoot another issue now. The social bookmark icons disappear on product pages when I downsize the resolution to simulate mobile devices. The strange thing is, that this doesn't happen on the index.php page with smaller resolutions. They still show up on the index.php, but not on other pages. Any idea or suggestion where to look at? Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted September 30, 2017 Author Share Posted September 30, 2017 Something else I hadn't noticed. The following changes should fix it. In headertags_seo_styles.css, add .hts_bookmarks_place {padding:10px 0;float:right} In includes/modules/header_tags_social_bookmarks.php change echo '<div style="float:right;">'; if (HEADER_TAGS_ENABLE_GOOGLE_PLUS == 'true') { echo '<div style="float:left; padding-top:' . $padding . 'px; padding-right:20px;"><g:plusone></g:plusone></div>'; } echo '<div style="float:right;">' . $dataStr . '</div>'; to this (you are just removing the style code) echo '<div>'; if (HEADER_TAGS_ENABLE_GOOGLE_PLUS == 'true') { echo '<div style="float:left; padding-top:' . $padding . 'px; padding-right:20px;"><g:plusone></g:plusone></div>'; } echo '<div>' . $dataStr . '</div>'; In index.php, or wherever it is in your shop, change if (HEADER_TAGS_DISPLAY_SOCIAL_BOOKMARKS == 'true') { echo '<div>'; include(DIR_WS_MODULES . 'header_tags_social_bookmarks.php'); echo '</div>'; } to if (HEADER_TAGS_DISPLAY_SOCIAL_BOOKMARKS == 'true') { echo '<div class="row"><div class="hts_bookmarks_place">'; include(DIR_WS_MODULES . 'header_tags_social_bookmarks.php'); echo '</div></div>'; } Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.