GithubHelp home page GithubHelp logo

linkpreview-issues's Introduction

HumHub - Putting People and Pieces together

Test Status Yii2 CLA assistant

HumHub is an intuitive to use and modular designed open-source software, used primarily as social network, knowledge database, intranet or information and communication platform.

The software is written in PHP and is best described by dividing into 4 main parts: User, Spaces, Content and Modules.

  • User: All users have their own customisable profile (including name, profile picture, cover photo and personal information) and can follow and interact with each other. If wished and enabled, users can create own content, comment posts and join Spaces. Profile fields, permissions and all settings can be defined individually by the network operator (administrator).

  • Spaces: Rooms or groups for any projects, departments, events or other needs. Network operators can create as many Spaces as needed and automatically map users into the desired Spaces. HumHub comes with an advanced permission and notification system (including email summaries).

  • Content: Users can create content of all kinds (posts, wiki pages, photo/video, schedule appointments, create events or tasks) depending on their permission and share it with other members in their Space. There is a multi-level comment function, versatile collaboration options and also features to report inappropriate posts and content. All Content, Spaces and Members can be easily found through various and individually definable filter and search functions, Content can be edited, deleted and archived.

  • Modules: The main software is designed in a modular way and can be extended by approximately 80 modules. These can easily be added to by installation and activation. This gives operators the possibility to set up and configure the network according to their needs and individual wishes. Among the modules are Advanced LDAP, RESTful API, Mass User Import, Calendar, Wiki, OnlyOffice, JWT SSO, Legal Tools, Translation Manager, Custom Themes and Custom Pages, Tasks, Gallery, News, Polls and Mail for Direct Messages.

With HumHub, we help people around the world to connect, stay informed, display and share content of various kinds, exchange files and communicate and collaborate with each other.

The software is responsive designed and works great on different devices, including smartphones and tablets. HumHub is available in over 30 languages and is used in over 4,500 organizations worldwide.

More information about HumHub can be found here:

linkpreview-issues's People

Contributors

luke- avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

yoshida-git-ai

linkpreview-issues's Issues

Error with PHP 8.1 and error_reporting(E_ALL)

If error_reporting is set to E_ALL, the previewing doesn't work.
I didn't take time to investigate. Perhaps a composer update would solve the problem, the the composer.json is not present, so I cannot test.

Error log:

yii\base\ErrorException: During inheritance of IteratorAggregate: Uncaught yii\base\ErrorException: Return type of Fusonic\Linq\Linq::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/hhdev/protected/modulesnoncuzy/linkpreview/vendor/fusonic/linq/src/Fusonic/Linq/Linq.php:728
Stack trace:
#0 /var/www/hhdev/protected/modulesnoncuzy/linkpreview/vendor/fusonic/linq/src/Fusonic/Linq/Linq.php(36): yii\web\ErrorHandler->handleError(code: '...', message: '...', file: '...', line: '...')
#1 /var/www/hhdev/protected/vendor/composer/ClassLoader.php(571): ::unknown()
#2 /var/www/hhdev/protected/vendor/composer/ClassLoader.php(428): ::Composer\Autoload\includeFile(file: '...')
#3 /var/www/hhdev/protected/modulesnoncuzy/linkpreview/vendor/fusonic/opengraph/src/Consumer.php(101): Composer\Autoload\ClassLoader->loadClass(class: '...')
#4 /var/www/hhdev/protected/modulesnoncuzy/linkpreview/vendor/fusonic/opengraph/src/Consumer.php(79): Fusonic\OpenGraph\Consumer->extractOpenGraphData(content: '...')
#5 /var/www/hhdev/protected/modulesnoncuzy/linkpreview/controllers/IndexController.php(52): Fusonic\OpenGraph\Consumer->loadHtml(html: '...', fallbackUrl: '...')
#6 /var/www/hhdev/protected/vendor/yiisoft/yii2/base/InlineAction.php(57): humhub\modules\linkpreview\controllers\IndexController->actionFetch()
#7 /var/www/hhdev/protected/vendor/yiisoft/yii2/base/InlineAction.php(57): ::call_user_func_array:{/var/www/hhdev/protected/vendor/yiisoft/yii2/base/InlineAction.php:57}(callback: '...', args: '...')
#8 /var/www/hhdev/protected/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams(params: '...')
#9 /var/www/hhdev/protected/vendor/yiisoft/yii2/base/Module.php(552): humhub\modules\linkpreview\controllers\IndexController->runAction(id: '...', params: '...')
#10 /var/www/hhdev/protected/vendor/yiisoft/yii2/web/Application.php(103): humhub\components\Application->runAction(route: '...', params: '...')
#11 /var/www/hhdev/protected/vendor/yiisoft/yii2/base/Application.php(384): humhub\components\Application->handleRequest(request: '...')
#12 /var/www/hhdev/index.php(26): humhub\components\Application->run()
#13 {main} in /var/www/hhdev/protected/modulesnoncuzy/linkpreview/vendor/fusonic/linq/src/Fusonic/Linq/Linq.php:36
Stack trace:
#0 /var/www/hhdev/protected/vendor/yiisoft/yii2/base/ErrorHandler.php(0): yii\web\ErrorHandler->handleFatalError()
#1 /var/www/hhdev/protected/vendor/composer/ClassLoader.php(571): ::unknown()
#2 /var/www/hhdev/protected/vendor/composer/ClassLoader.php(428): ::Composer\Autoload\includeFile(file: '...')
#3 /var/www/hhdev/protected/modulesnoncuzy/linkpreview/vendor/fusonic/opengraph/src/Consumer.php(101): Composer\Autoload\ClassLoader->loadClass(class: '...')
#4 /var/www/hhdev/protected/modulesnoncuzy/linkpreview/vendor/fusonic/opengraph/src/Consumer.php(79): Fusonic\OpenGraph\Consumer->extractOpenGraphData(content: '...')
#5 /var/www/hhdev/protected/modulesnoncuzy/linkpreview/controllers/IndexController.php(52): Fusonic\OpenGraph\Consumer->loadHtml(html: '...', fallbackUrl: '...')
#6 /var/www/hhdev/protected/vendor/yiisoft/yii2/base/InlineAction.php(57): humhub\modules\linkpreview\controllers\IndexController->actionFetch()
#7 /var/www/hhdev/protected/vendor/yiisoft/yii2/base/InlineAction.php(57): ::call_user_func_array:{/var/www/hhdev/protected/vendor/yiisoft/yii2/base/InlineAction.php:57}(callback: '...', args: '...')
#8 /var/www/hhdev/protected/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams(params: '...')
#9 /var/www/hhdev/protected/vendor/yiisoft/yii2/base/Module.php(552): humhub\modules\linkpreview\controllers\IndexController->runAction(id: '...', params: '...')
#10 /var/www/hhdev/protected/vendor/yiisoft/yii2/web/Application.php(103): humhub\components\Application->runAction(route: '...', params: '...')
#11 /var/www/hhdev/protected/vendor/yiisoft/yii2/base/Application.php(384): humhub\components\Application->handleRequest(request: '...')
#12 /var/www/hhdev/index.php(26): humhub\components\Application->run()
#13 {main}

Small error in log - version 2.0.0-beta.1

With version 2.0.0-beta.1, I often get:

Error: Call to a member function __toString() on null in
/usr/www/humhub/protected/modules/linkpreview/controllers/IndexController.php:73
Stack trace:
#0
/usr/www/humhub/protected/modules/linkpreview/controllers/IndexController.php(48):
humhub\modules\linkpreview\controllers\IndexController->parseMetaImage()
#1 [internal function]:
humhub\modules\linkpreview\controllers\IndexController->actionFetch()
#2
/usr/www/humhub/protected/vendor/yiisoft/yii2/base/InlineAction.php(57):
call_user_func_array()
#3
/usr/www/humhub/protected/vendor/yiisoft/yii2/base/Controller.php(178):
yii\base\InlineAction->runWithParams()
#4
/usr/www/humhub/protected/vendor/yiisoft/yii2/base/Module.php(552):
yii\base\Controller->runAction()
#5
/usr/www/humhub/protected/vendor/yiisoft/yii2/web/Application.php(103):
yii\base\Module->runAction()
#6
/usr/www/humhub/protected/vendor/yiisoft/yii2/base/Application.php(384):
yii\web\Application->handleRequest()
#7
/usr/www/humhub/index.php(25):
yii\base\Application->run()
#8 {main}

The bug is here:

$imageUrls = $info->getMetas()->get('og:image:url') ?: $info->getMetas()->get('og:image') ?: [$info->image->__toString()];

As $info->image can be null.

Incorrect link preview for non-UTF-8 sites

For example, if I want to share a page encoded in "Windows-1250", the title and description of the preview will end with the first Latin extended character.

Can this somehow be corrected/converted?

HumHub-linkpreview-issue

Title should be "ANKETA: Jak vnímáte poslední kroky Ubisoftu?"

Preview on peertube video

Hi,
Would it be possible to find a way to have a preview on a peertube video link, with the LinkPreview plugin?
Then, this great opensource social platform would be supporting an opensource video platform :)
Thanks!

[Future Request] REST API

It is more wonderful if a link preview was automatically created in conjunction with the post creation API, or linked to the post with the link preview API.

Favicon is replaced by new one when posting a link

Hi there.
When adding a link in a post, the preview works well, but the favicon is changed by the favicon of the linked website.
That's not a big deal but it's disturbing seeing the youtube favicon instead of the good one.

Thanks for your help.

Remove 'error' text on internal links

When I link to other internal links on my humhub instance it displays 'error' in the link preview

error

I understand that these can't be rendered completely, but could we remove the word 'Error' from the preview?

Problem accepting payment

Hello! Attempting to install this module, 'without account' and as 'Individual (private user)', I found that card is really the only relevant option from here in Norway. Having tried three different cards, now, two credit cards and one debit card, all three attempts resulted in a 'declined' message.

This was suprising because all three cards have more than enough money on them, and are set up to be possible to use for purchases online. The experience was unusual, as it is not uncommon for me to buy things online. Unless this is something very particular that just relates to me, you may want to contact Stripe to see if there is some technical problem that prevents people who do not have iDEAL, SEPA Direct, Alipay, SOFORT, giropay or EPS, from buying this module. Thanks

issue with encoding

As a french user, there are a lot of links to french websites.

Preview appears like this (minus the space ... otherwise github translate the accent correctly)

Un hommage au pilote l&eacute ;gendaire Ayrton Senna

instead of

Un hommage au pilote légendaire Ayrton Senna

All accent and special chars are incorrect.

I guess it's a UTF-8 encoding issue...

Problems with à or è chars

Seems there are problems with links with accented letters like: ò,à,è and son on.

In paritcular when embedding links from linkedin.
Same links in the past used to works .

Ignore mailto links

[Zend\Http\Exception\InvalidArgumentException] Zend\Uri\Exception\InvalidUriPartException: Scheme "mailto" is not valid or is not accepted by Zend\Uri\Http in /srv/humhub/protected/vendor/zendframework/zend-uri
Stack trace:
#0 /srv/humhub/protected/vendor/zendframework/zend-uri/src/Uri.php(284): Zend\Uri\Uri->setScheme('mailto')
#1 /srv/humhub/protected/vendor/zendframework/zend-uri/src/Http.php(214): Zend\Uri\Uri->parse('mailto:some-...')
#2 /srv/humhub/protected/vendor/zendframework/zend-uri/src/Uri.php(142): Zend\Uri\Http->parse('mailto:some-...')
#3 /srv/humhub/protected/vendor/zendframework/zend-http/src/Request.php(203): Zend\Uri\Uri->__construct('mailto:some-...')
#4 /srv/humhub/protected/vendor/zendframework/zend-http/src/Client.php(317): Zend\Http\Request->setUri('mailto:some-...')
#5 /srv/humhub/protected/vendor/zendframework/zend-http/src/Client.php(143): Zend\Http\Client->setUri('mailto:some-...')
#6 /srv/www/htdocs/suse/modules/linkpreview/controllers/IndexController.php(37): Zend\Http\Client->__construct('mailto:some-...', Array)
#7 [internal function]: humhub\modules\linkpreview\controllers\IndexController->actionFetch()
#8 /srv/humhub/protected/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#9 /srv/humhub/protected/vendor/yiisoft/yii2/base/Controller.php(180): yii\base\InlineAction->runWithParams(Array)
#10 /srv/humhub/protected/vendor/yiisoft/yii2/base/Module.php(528): yii\base\Controller->runAction('fetch', Array)
#11 /srv/humhub/protected/vendor/yiisoft/yii2/web/Application.php(103): yii\base\Module->runAction('linkpreview/ind...', Array)
#12 /srv/humhub/protected/vendor/yiisoft/yii2/base/Application.php(386): yii\web\Application->handleRequest(Object(humhub\components\Request))

Add link preview contents to search index

Would it be possible to add the link preview title and description to the search index so that the content the link is attached to can be found through those keywords?

Doesn't works on mobile.

It works great from my computer but it doesn't do anything from a mobile.

Would you please do something for that.
Thanks

LinkPreview : 1.16.1
Humhub : 1.12.0
Browser :

  • Firefox 103.1.0
  • Chrome 103.0.5060.129

Bad description in case using youtube

Dear all
I’m using HumHub Version : 1.8.0
LinkPreview : Version : 1.15.6
but, when I share youtube video with arabic description, video is displayed like this
�ا تر� بعد ا�بعاد ا��ش��ة

could you help pls?
regards

Not working as expected

I've recently installed the linkpreview module v1.15.3. I'm running HH v1.8.2 community edition on a hosted server.

Initially the module worked reasonably well (the thumbnail was a bit small). After a few days it now seems to work only sporadically.

Some sites produce no link at all: https://bbc.co.uk https://twitter.com/

Some sites generate a text preview, but no image: https://www.google.co.uk/ https://www.amazon.co.uk/

And some sites generate a thumbnail and text, as expected: https://www.independent.co.uk/ https://www.humhub.com/en

I've tried including other text in the post, before or after the link.

Any ideas?

Search results page broken (JavaScript errors)

What steps will reproduce the problem?

Submit a search on the global search page.

What is the expected result?

The results should display and no JavaScript errors should result.

What do you get instead?

The following JavaScript warning:

[Warning] Required a non initialized module: linkpreview.LinkPreview (humhub-app.js:17094)

Also, the following JavaScript error:

[Error] ERROR - root: Could not initialize module: humhub.modules.ui.modal
        TypeError: null is not an object (evaluating 'a.global.$')
                m — humhub-app.js:18891
                r — humhub-app.js:17210:138
                (anonymous function) — humhub-app.js:17203
                each — humhub-app.js:728
                (anonymous function) — humhub-app.js:17202
                l — humhub-app.js:1850
                (anonymous function) — humhub-app.js:1857
	(anonymous function) (humhub-app.js:17537)
	(anonymous function) (humhub-app.js:17524:425)
	(anonymous function) (humhub-app.js:17517)
	r (humhub-app.js:17573)
	r (humhub-app.js:17212)
	(anonymous function) (humhub-app.js:17203)
	each (humhub-app.js:728)
	(anonymous function) (humhub-app.js:17202)
	l (humhub-app.js:1850)
	(anonymous function) (humhub-app.js:1857)

Additional info

Q A
HumHub version 1.6.0
PHP version 7.3.19
Operating system Debian

Note: Also provide the full error stacks from Administration --> Information --> Logging and errors from your browser console if possible.
Note: Please use the community site for any questions on customizing HumHub.

Preview Image size

Is there a way to enlarge the image in the preview, is it module-based or humhub core-based of how the previews are displayed?

Error message since on 1.15.1

Hello,

Since I've updated from 1.15.0 to 1.15.1, each time I post a message or a comment (a Simple "test message" without any links inside), I have this error message that appear at the bottom of the website :

TypeError: errors is undefinedLinkPreviewEditor.prototype.setPreviewErrors@https://www.high-score.fr/assets/94f4b1a7/js/humhub.linkpreview.js?v=1.8.1:219:16
LinkPreviewEditor.prototype.reset@https://www.high-score.fr/assets/94f4b1a7/js/humhub.linkpreview.js?v=1.8.1:158:14
LinkPreviewEditor.prototype.init/<@https://www.high-score.fr/assets/94f4b1a7/js/humhub.linkpreview.js?v=1.8.1:122:18
dispatch@https://www.high-score.fr/static/js/humhub-app.js?v=1.8.1:30:3260
add/q.handle@https://www.high-score.fr/static/js/humhub-app.js?v=1.8.1:30:1234
trigger@https://www.high-score.fr/static/js/humhub-app.js?v=1.8.1:30:24991
trigger/<@https://www.high-score.fr/static/js/humhub-app.js?v=1.8.1:30:25597
each@https://www.high-score.fr/static/js/humhub-app.js?v=1.8.1:19:15968
each@https://www.high-score.fr/static/js/humhub-app.js?v=1.8.1:19:14428
trigger@https://www.high-score.fr/static/js/humhub-app.js?v=1.8.1:30:25572
i_.prototype.clear@https://www.high-score.fr/static/js/humhub-bundle.js?v=1.8.1:221:12287
j_.prototype.clear@https://www.high-score.fr/static/js/humhub-bundle.js?v=1.8.1:227:631
j.prototype.init/<@https://www.high-score.fr/static/js/humhub-bundle.js?v=1.8.1:233:1049
dispatch@https://www.high-score.fr/static/js/humhub-app.js?v=1.8.1:30:3260
add/q.handle@https://www.high-score.fr/static/js/humhub-app.js?v=1.8.1:30:1234
trigger@https://www.high-score.fr/static/js/humhub-app.js?v=1.8.1:30:24991
trigger/<@https://www.high-score.fr/static/js/humhub-app.js?v=1.8.1:30:25597
each@https://www.high-score.fr/static/js/humhub-app.js?v=1.8.1:19:15968
each@https://www.high-score.fr/static/js/humhub-app.js?v=1.8.1:19:14428
trigger@https://www.high-score.fr/static/js/humhub-app.js?v=1.8.1:30:25572
200@https://www.high-score.fr/static/js/humhub-bundle.js?v=1.8.1:250:5554
q/k.status/

This link preview will not be saved because of errors: Image should contain at most 255 characters.

What steps will reproduce the problem?

Paste this link into a humhub instance with the link preview module enabled https://www.cbsnews.com/news/climate-change-air-quality-unhealthy-wildfires-first-street/

What is the expected result?

The image from the article is displayed

What do you get instead?

This link preview will not be saved because of errors: Image should contain at most 255 characters.

image255

Additional info

Q A
HumHub version Version: 1.15.0
PHP version
Operating system Debian

Note: Also provide the full error stacks from Administration --> Information --> Logging and errors from your browser console if possible.
Note: Please use the community site for any questions on customizing HumHub.

LinkPreview was working great and then just stopped working

We are running an older version of HumHub and have been using LinkPreview with great success for the better part of a year. All of a sudden, LinkPreview just stopped working. We haven't upgraded anything (OS, LinkPreview, HumHub, etc). There is plenty of disk space free and no RAM issues.

None of the logs have any useful information and the specific 500 error doesn't seem to be recorded anywhere (/var/log/httpd/* or in HumHub admin logs).

Do you have any suggestions for what we might do to regain this functionality? Any other information that I could provide?

Thanks,
Bill

LinkPreview: 1.14
HumHub: 1.7.3

$ uname -a
Linux 4.18.0-240.10.1.el8_3.x86_64 #1 SMP Mon Jan 18 17:05:51 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
$ httpd -v
Server version: Apache/2.4.37 (centos)
Server built: Nov 4 2020 03:20:37
$ php -v
PHP 7.2.24 (cli) (built: Oct 22 2019 08:28:36) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

image

Oembed is not working properly in the mail module

The Oembed is not working properly in the mail module (Messaging). I have to paste Youtube Url and send it to the user, to see how it is visible.

image

Additional info

Q A
HumHub version 1.13.0-beta.2
PHP version PHP - Version - 8.1.13

Link previews with validation errors are silently discarded

If a link preview record fails validation, for example because a URL is longer than 255 characters, the preview is silently discarded upon submitting the post.

This can be especially bewildering if the troublesome URL is for the preview image, over which the user has no control.

Alert box showing "asdf"

After adding a comment to a global content and submitting a form containing this comment, I got an alert box:
image

Isn't it a forgotten test in humhub.linkpreview.js?

        this.$.closest('form').on('submit', function () {
            alert('asdf');
        });

Bought this. Does not work

Is there an issue with the add-on we should be aware? My installaton of humhub does not produce previews in any link. Are there dependencies that should be taken care of before installation?

Preview relative image links broken

When the preview image is a relative link, it resolves incorrectly to a URL on the HumHub site, rather than on the target site, causing the preview image to fail to load.

LinkPreview module version: 1.15.3
HumHub version: 1.8.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.