News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Like Posts

Started by vbgamer45, June 29, 2013, 09:29:03 AM

Previous topic - Next topic

CDLehner

I'm hoping, this will help you guys.

When I try to uninstall, the Like Posts mod; I get this...


Gluz

Looks like the files have not been modified at the MOD installation, or you restore the files from a backup that doesn't have the MOD installed.

Check the files to see if it have something about the MOD, not the whole piece of code the package manager search but a bit of it, if it doesn't have any of the code you can uninstall the MOD ignoring that errors, because the files doesn't have been modified, and then should not cause any trouble.

Then reinstall the mod and after, check the files to see if this time they are modified with the bits from the MOD.

CDLehner

Quote from: Gluz on August 20, 2017, 08:57:07 PM
Looks like the files have not been modified at the MOD installation, or you restore the files from a backup that doesn't have the MOD installed.

Check the files to see if it have something about the MOD, not the whole piece of code the package manager search but a bit of it, if it doesn't have any of the code you can uninstall the MOD ignoring that errors, because the files doesn't have been modified, and then should not cause any trouble.

Then reinstall the mod and after, check the files to see if this time they are modified with the bits from the MOD.

Sorry  ???  ???  ???

CDLehner

Quote from: CDLehner on August 20, 2017, 09:19:11 PM
Quote from: Gluz on August 20, 2017, 08:57:07 PM
Looks like the files have not been modified at the MOD installation, or you restore the files from a backup that doesn't have the MOD installed.

Check the files to see if it have something about the MOD, not the whole piece of code the package manager search but a bit of it, if it doesn't have any of the code you can uninstall the MOD ignoring that errors, because the files doesn't have been modified, and then should not cause any trouble.

Then reinstall the mod and after, check the files to see if this time they are modified with the bits from the MOD.

Sorry  ???  ???  ???

I'm sorry; I really don't follow  :-[

https://youtu.be/AR6eXWNJzoY

shawnb61

#924
Quote from: CDLehner on August 22, 2017, 02:08:54 PM
I'm sorry; I really don't follow  :-[

At some point in time, your code was altered.  The fact that Like Posts will not de-install clean shows you that. 

In an ideal world, before doing any maintenance in your production environment, you do backups.   The BEST solution would be to restore these files back to the way they were before this change.  Note that a backup is useless unless you know how to restore it.  A useful exercise for someone new to this would be to do some backups on cPanel and practice doing restores on your local PC.  Just to learn how.   In a safe place. 

If you do not have backups, Gluz is providing some advice how to recover.   To understand Gluz' input, it first helps to understand how packages work.  In most instances, the package installation process for mods does not copy whole source code files.  It can't, because the source code files may have been modified by other mods.  How can 5 mods update the same file?   Well, the way they do so is to apply targeted changes, primarily using a find/replace method. 

Click on the little page & pencil icon to the left of the 'Replace' on your screenshot.  That will show you the attempted change - usually a find/replace.  The find/replace won't work, because it can't find what it needs to find first...  That's what those errors are telling you. 

So...  How to fix...   

Backup your file system.  It will be handy to have this, in case you make things worse.  (We've all been there...)

For each of the failed substitutions in the list you showed us, look in your source code and see if you can figure out why the find/replace doesn't work.  It sometimes helps to compare the source to the 'vanilla' SMF code, to easily identify changes. 

If the source code in question was restored to a point prior to your Like Posts installation somehow (i.e., if the find/replace isn't needed...), you can safely ignore the error messages and proceed with the de-install & subsequent re-install.  This is what Gluz was saying.  Maybe we're lucky. 

If the source code is otherwise mangled somehow, you have deeper issues.  If that is the case, we need to look at refreshing your code. 

Hope this helps,

A question worth asking is born in experience & driven by necessity. - Fripp

razzy

Hello =):

Having an issue with compatibility with this Like mod and the theme installed on the board. Everything checked out in the Installation except for a couple at the bottom in the theme bit. I'm still getting 'un-rusted' when it comes to designing and getting things working, so i'm a little stuck.

- Board: The like feature isnt showing up anywhere on the board, might be conflict with the points mod..or just the boards theme. I'm unsure.
- Admin Panel: The mod settings shows up in the admin panel, but "General Settings" is the only one that loads. If I try and click on "Permission Settings, Board Settings, or Recount Like Stats" it glitches out and says..

"An Error Has Occurred!
Function name must be a string"

Forum version: SMF 2.0.14
Current SMF version: SMF 2.0.14
GD version: bundled (2.1.0 compatible)
MySQL version: 10.0.32-MariaDB
PHP: 7.0.22
Board Theme: Gearbox2.0

Link to board can be pm'd. Hopefully there is an easy fix for it to show up. This is the last mod my members are looking forward to having. -crosses fingers-

Arantor

This mod doesn't work on PHP 7.
Holder of controversial views, all of which my own.

shawnb61

True it doesn't support php7, but earlier in this thread folks have shared fixes for that, such as:
https://github.com/siddhartha-gupta/SMF-Likes/pull/51/commits/5ddc158ff148a3eb9c8b2145e3bbced9d602b14d
A question worth asking is born in experience & driven by necessity. - Fripp

razzy

Oh, alright. Thanks for the help.  :D

razzy

Its a touch glitch-y with the custom theme that the board is using, but only in the stats area so far. Thank you for the help. I'm just going to leave it as is until a later date.

skb

I've come across a bug/problem with the Mod and wonder if someone can point towards a fix.

Users can click the Like button, then click on the Browser's Left Arrow button to go back & click again on the Like button. This can be done multiple times and could be misused.

SMF 2.1.4 / TP 2.2.2

crashfirephoenix

On my SMF 2.0.15 I have likeposts installed. Old topics have the "Like" buttons just fine, but new topics that get created don't have the "Like" buttons... any ideas?

shawnb61

You need to add new boards under Admin | Configuration | Like Posts | Board Settings.
A question worth asking is born in experience & driven by necessity. - Fripp

shawnb61

Quote from: skb on November 10, 2017, 09:42:11 PM
I've come across a bug/problem with the Mod and wonder if someone can point towards a fix.

Users can click the Like button, then click on the Browser's Left Arrow button to go back & click again on the Like button. This can be done multiple times and could be misused.

I had been wondering how this was happening, thanks for the report.  Not sure it's a major issue - Out of a few thousand Likes, I have 6 dupes. 

If you really wanted to get rid of it I think you'd change the DB to disallow dupes, & trap/ignore that error. 
A question worth asking is born in experience & driven by necessity. - Fripp

jack001

getting error on vvide index template
find:
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>';

add after:

if(LikePosts::$LikePostsUtils->showLikeNotification()) {
echo '
<li><span class="showLikeNotification" onclick="lpObj.likePostsNotification.showLikeNotification()">', $txt['like_show_notifications'], '</span></li>';
}
https://www.edufor.xyz Edutainment forum - Education with Entertainment!

Rickard

Hi.

I have mowed to a cloud based server solution, and try to reinstall like posts.
If i remember correct, i might have neglected to uninstall the first installation before installing the new one, thinking it would upgrade.
Now i have duplicate "likes" in posts, and avatar area (everyvhere) and the page loads really slow.
As far as i can see it seems to be the like posts that takes a long time to load, like icons somtimes turn up after 30-45 sec...
Any idea what i should do?
Can i try to uninstall but still have the statistics left in database?
Issue is in www.poolforum.se
Admin for 3 forums:
www.varmepumpsforum.com
www.poolforum.se
www.atvforum.se
SMF 2.0.15
Default Theme: CS Manual by crip
Simple Portal 2.3.7
Got my own hosted and managed server on www.space2u.com

Rickard

How do i know wich files are altered by installation, i could look for duplicate entries in the files and delete one set of lines in the codes?
Admin for 3 forums:
www.varmepumpsforum.com
www.poolforum.se
www.atvforum.se
SMF 2.0.15
Default Theme: CS Manual by crip
Simple Portal 2.3.7
Got my own hosted and managed server on www.space2u.com

jack001

Is it possible to have it look something like this?
https://www.edufor.xyz Edutainment forum - Education with Entertainment!

JoeWaters

We have recently moved to a new server. It has Apache Version 2.4.6 versus the earlier Version 2.2.15.  It is also using PHP 7.0.27 versus the earlier PHP V 5.4.45.  On the new server the Likes mod is not working. I see from earller posts here that Likes is not compatible with Version PHP 7.  I can not simply turn off the Likes feature since I get the "Function name must be a string" error.  I have not yet tried to UNINSTALL since I was not sure if that would cause other problems.  My question is, would the UNINSTALL work OK to remove the mod, or should I attempt to have an earlier version of PHP put on the server?

shawnb61

A question worth asking is born in experience & driven by necessity. - Fripp

Advertisement: