# \[SOLVED\]Pydio public link - JSON error / trying to change public link

**URL:** <https://forum.pydio.com/t/solved-pydio-public-link-json-error-trying-to-change-public-link/1109>\
**Category:** Pydio 8\
**Created:** [May 17, 2018, 10:38am UTC](https://forum.pydio.com/t/solved-pydio-public-link-json-error-trying-to-change-public-link/1109 "2018-05-17T10:38:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ra\_85](https://avatars.discourse-cdn.com/v4/letter/r/f1d935/32.png) [@ra\_85](https://forum.pydio.com/u/ra_85)\
**Post date:** [May 17, 2018, 10:38am UTC](https://forum.pydio.com/t/solved-pydio-public-link-json-error-trying-to-change-public-link/1109/1 "2018-05-17T10:38:43Z")

</div>

Hey guys,  
I am trying to setup a 7.0 install and tried changing the public share link (Ubuntu 16). Everything seems to be working fine until i try changing the public link from /public/ to /fs/  
I started off by doing the following

1. Changed /public to /fs in the pydio admin settings

After the above step, when i create a public link it does seem to replace the public/ to fs/ in the public url but i get a JSON error when i click that link.  
Then based on this forum inputs i did the following.

1. Changed the data/public folder to data/public.bak (And also tried /data/fs)
2. Changed the hard-coded public/ to /fs/ in plugins/action.share/res/minisite.php
3. Removed the three .ser files inside the cache folder

Now when i click the link (domain/eshare/fs/X1234G) … the pydio page opens up but it stays on the welcome to pydio popup and loads forever.  
In the console i see an error as below  
Failed to load resource: the server responded with a status of 404 (Not Found)  
domain/eshare/public/?&minisite\_session=X1234G&&get\_action=get\_xml\_registry&ws\_id=0.1234565788765&secure\_token=uejhbrf76t43hrfei3487hrfejn30b  
NOTE: i still see the public/ in the url which i had changed in the minisite.php file. Not sure if this is being cached somewhere else or if i have to do any further steps to make this work.

Could anyone help with this plz.  
All i need it to replace the public/ to fs/ in the public url…  
I tried the git discussions and on the forums here but i still cant seem to find a good solution for this.

NOTE:

- My base url is : domain/eshare/
- I have not made any changes inside the htaccess file

Thanks  
R

---

<div class="post-metadata">

**Author:** ![zayn](https://avatars.discourse-cdn.com/v4/letter/z/a87d85/32.png) [@zayn](https://forum.pydio.com/u/zayn)\
**Post date:** [May 17, 2018, 12:09pm UTC](https://forum.pydio.com/t/solved-pydio-public-link-json-error-trying-to-change-public-link/1109/2 "2018-05-17T12:09:07Z")

</div>

Hi,  
could you tell me if it’s a fresh install or one that you already had ?

---

<div class="post-metadata">

**Author:** ![c12simple](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/c12simple/32/90_2.png) [@c12simple](https://forum.pydio.com/u/c12simple)\
**Post date:** [May 17, 2018, 12:15pm UTC](https://forum.pydio.com/t/solved-pydio-public-link-json-error-trying-to-change-public-link/1109/3 "2018-05-17T12:15:16Z")

</div>

Hi,

- In Pydio root/.htaccess, please make sure that RewriteBase /eshare

- do not create data/fs folder, you should remove/rename fs folder

- make sure apache2 rewrite module is enabled (sudo a2enmod rewrite)

> [@ra\_85](#):
>
> Removed the three .ser files inside the cache folder

- clear cache data/cache/plugins\_\*

> [@ra\_85](#):
>
> Changed the hard-coded public/ to /fs/ in plugins/action.share/res/minisite.php

Do not change this file

> [@ra\_85](#):
>
> Changed /public to /fs in the pydio admin settings

Also make sure SErver URL is : [http://domain.com/eshare](http://domain.com/eshare)

---

<div class="post-metadata">

**Author:** ![ra\_85](https://avatars.discourse-cdn.com/v4/letter/r/f1d935/32.png) [@ra\_85](https://forum.pydio.com/u/ra_85)\
**Post date:** [May 17, 2018, 8:19pm UTC](https://forum.pydio.com/t/solved-pydio-public-link-json-error-trying-to-change-public-link/1109/4 "2018-05-17T20:19:34Z")

</div>

Hi Zayn/c12simple

Yes the install is a fresh one.

RewriteBase /eshare : Yes (Was like this)  
remove/rename fs folder : Yes, i had tried it this way too  
sudo a2enmod rewrite : verified and active  
clear cache data/cache/plugins\_\* : Performed this … and after this it now seems to be giving a full 404 page not found 🙂  
Changed the hard-coded public/ : I’ve reverted this  
Server URL is : [http://domain.com/eshare](http://domain.com/eshare) : Yes (Was like this).

NOTE: i have checked my apache logs but i couldnt find any error there either.

Again, the link generates fine … with domain/eshare/fs/XXXXX  
but clicking it gets me a 404 page not found.  
The requested URL /eshare/fs/ca2d94 was not found on this server.

Thanks  
RR

---

<div class="post-metadata">

**Author:** ![ra\_85](https://avatars.discourse-cdn.com/v4/letter/r/f1d935/32.png) [@ra\_85](https://forum.pydio.com/u/ra_85)\
**Post date:** [May 18, 2018, 3:54am UTC](https://forum.pydio.com/t/solved-pydio-public-link-json-error-trying-to-change-public-link/1109/5 "2018-05-18T03:54:56Z")

</div>

Hi Folks,

My previous response was flagged here, not sure why… Though i would request : I am new to the community so if i have posted something not in accordance with the rules here I apologize.

Very close to resolving this!  
by the way i have created a public link (on my public server) so if anyone would like to login and check or Teamviewer into it i would be more than happy.

After i change the link and do all the steps i now to get the pydio page with the updated ( fs/) link.  
But in the console i see this  
XHR failed loading: GET "domain/eshare/ **public** /?&minisite\_session=XXXXX  
NOTE: the URL in the browser shows domaincom/eshare/ **fs** BUT the link in the console still shows domain/eshare/ **public** … i.e. the new link is not reflecting in the XHR request.

I have cleared the cache all over again but this link in the console stays persistent.

Another point to note is that when i pick that link from the console and replace the **public** / with **fs** / it loads up an xml file correctly.  
Which means if i am able to alter that XHR request then it should be working fine.

**My Apache logs show the following error (Not sure if this has anything to do with my issue):**  
Got error ‘PHP message: RuntimeException thrown within the exception handler!\nPHP message:  
Original exception was: Unable to emit response; headers already sent in /var/www/html/eshare/core/vendor/zendframework/zend-diactoros/src/Response/SapiEmitter.php on line 31\n  
PHP message: New exception is: Unable to emit response; headers already sent in /var/www/html/eshare/core/vendor/zendframework/zend-diactoros/src/Response/SapiEmitter.php on line 31  
#0 /var/www/html/eshare/core/src/pydio/Core/Http/Middleware/SapiMiddleware.php(143): Zend\Diactoros\Response\SapiEmitter-\>emit(Object(Zend\Diactoros\Response))\n  
#1 /var/www/html/eshare/core/src/pydio/Core/Http/Server.php(247): Pydio\Core\Http\Middleware\SapiMiddleware-\>emitResponse(Object(Zend\Diactoros\ServerRequest), Object(Zend\Diactoros\Response))\n  
#2 /var/www/html/eshare/core/src/pydio/Core/Http/Server.php(269): Pydio\Core\Http\Server-\>catchError(0, ‘Unable to emit …’, ‘/var/www/html/o…’, 31, Object(RuntimeException))\n  
#3 [internal function]: Pydio\Core\Http\Server-\>catchException(Object(RuntimeException))\n#4 {main}\n’, referer: domain/eshare/settings/config/core (I stripped the domain out since was unable to post with it)

Can anyone guide me on this please.

thanks  
r

---

<div class="post-metadata">

**Author:** ![ra\_85](https://avatars.discourse-cdn.com/v4/letter/r/f1d935/32.png) [@ra\_85](https://forum.pydio.com/u/ra_85)\
**Post date:** [May 19, 2018, 9:38am UTC](https://forum.pydio.com/t/solved-pydio-public-link-json-error-trying-to-change-public-link/1109/6 "2018-05-19T09:38:09Z")

</div>

Guys,  
Finally the error has been solved so am sharing here what worked for me.

So pydio 7.0.0 has the public link hardcoded in two places.

1. plugins/gui.ajax/RichClient.php : line 473
2. plugins/action.share/res/minisite.php : line 19  
Change the hardcoded “public/” to any value you wish  
Then change/add the same value in the admin settings under Pydio main options -\> Public base URI.

Then clear cache (There will be 6 files under the data/cache folder starting with the name plugin\_) delete all those 6 files.

Upload a file and create a new sharing link and it should work well now with the new link

Thanks  
r
